| 21 |
#include "io.h" |
#include "io.h" |
| 22 |
#include "screen.h" |
#include "screen.h" |
| 23 |
#include "menu.h" |
#include "menu.h" |
| 24 |
|
#include "user_priv.h" |
| 25 |
|
#include "section_list_display.h" |
| 26 |
#include <dlfcn.h> |
#include <dlfcn.h> |
| 27 |
#include <errno.h> |
#include <errno.h> |
| 28 |
#include <signal.h> |
#include <signal.h> |
| 31 |
#include <time.h> |
#include <time.h> |
| 32 |
#include <unistd.h> |
#include <unistd.h> |
| 33 |
|
|
| 34 |
int exec_mbem(const char *str) |
int list_section(void *param) |
| 35 |
|
{ |
| 36 |
|
section_list_display(param); |
| 37 |
|
|
| 38 |
|
return REDRAW; |
| 39 |
|
} |
| 40 |
|
|
| 41 |
|
int exec_mbem(void *param) |
| 42 |
{ |
{ |
| 43 |
void *hdll; |
void *hdll; |
| 44 |
int (*func)(); |
int (*func)(); |
| 45 |
char *c, *s; |
char *c, *s; |
| 46 |
char buf[FILE_PATH_LEN]; |
char buf[FILE_PATH_LEN]; |
| 47 |
|
|
| 48 |
strncpy(buf, str, sizeof(buf) - 1); |
strncpy(buf, (const char *)param, sizeof(buf) - 1); |
| 49 |
buf[sizeof(buf) - 1] = '\0'; |
buf[sizeof(buf) - 1] = '\0'; |
| 50 |
|
|
| 51 |
s = strstr(buf, "@mod:"); |
s = strstr(buf, "@mod:"); |
| 86 |
return REDRAW; |
return REDRAW; |
| 87 |
} |
} |
| 88 |
|
|
| 89 |
int exitbbs(const char *s) |
int exit_bbs(void *param) |
| 90 |
{ |
{ |
| 91 |
return EXITBBS; |
return EXITBBS; |
| 92 |
} |
} |
| 93 |
|
|
| 94 |
int license(const char *s) |
int license(void *param) |
| 95 |
{ |
{ |
| 96 |
display_file_ex(DATA_LICENSE, 1, 1); |
display_file(DATA_LICENSE, 1, 0); |
| 97 |
|
|
| 98 |
return REDRAW; |
return REDRAW; |
| 99 |
} |
} |
| 100 |
|
|
| 101 |
int copyright(const char *s) |
int copyright(void *param) |
| 102 |
{ |
{ |
| 103 |
display_file_ex(DATA_COPYRIGHT, 1, 1); |
display_file(DATA_COPYRIGHT, 1, 1); |
| 104 |
|
|
| 105 |
return REDRAW; |
return REDRAW; |
| 106 |
} |
} |
| 107 |
|
|
| 108 |
int reloadbbsmenu(const char *s) |
int reload_bbs_conf(void *param) |
| 109 |
{ |
{ |
| 110 |
clearscr(); |
clearscr(); |
| 111 |
|
|
| 125 |
return REDRAW; |
return REDRAW; |
| 126 |
} |
} |
| 127 |
|
|
| 128 |
int shutdownbbs(const char *s) |
int shutdown_bbs(void *param) |
| 129 |
{ |
{ |
| 130 |
log_std("Notify main process to exit\n"); |
log_std("Notify main process to exit\n"); |
| 131 |
|
|
| 136 |
|
|
| 137 |
return REDRAW; |
return REDRAW; |
| 138 |
} |
} |
| 139 |
|
|
| 140 |
|
int favour_section_filter(void *param) |
| 141 |
|
{ |
| 142 |
|
MENU_ITEM *p_menu_item = param; |
| 143 |
|
|
| 144 |
|
return (is_favor(&BBS_priv, p_menu_item->priv) && checklevel2(&BBS_priv, p_menu_item->level)); |
| 145 |
|
} |