Enable file search

This commit is contained in:
Andrew Pamment 2017-10-19 12:54:20 +10:00
parent 8a46f4b2e4
commit 237d27fe7a
2 changed files with 7 additions and 0 deletions

View File

@ -315,6 +315,7 @@ extern void prev_file_dir(struct user_record *user);
extern void next_file_sub(struct user_record *user); extern void next_file_sub(struct user_record *user);
extern void prev_file_sub(struct user_record *user); extern void prev_file_sub(struct user_record *user);
extern void file_scan(); extern void file_scan();
extern void file_search();
extern void lua_push_cfunctions(lua_State *L); extern void lua_push_cfunctions(lua_State *L);
extern void do_lua_script(char *script); extern void do_lua_script(char *script);

View File

@ -51,6 +51,7 @@
#define MENU_RESETALLPOINTERS 41 #define MENU_RESETALLPOINTERS 41
#define MENU_FILESCAN 42 #define MENU_FILESCAN 42
#define MENU_FULLMAILSCAN 43 #define MENU_FULLMAILSCAN 43
#define MENU_FILESEARCH 44
extern struct bbs_config conf; extern struct bbs_config conf;
extern struct user_record *gUser; extern struct user_record *gUser;
@ -203,6 +204,8 @@ int menu_system(char *menufile) {
menu[menu_items-1]->command = MENU_FILESCAN; menu[menu_items-1]->command = MENU_FILESCAN;
} else if (strncasecmp(&buffer[8], "FULLMAILSCAN", 12) == 0) { } else if (strncasecmp(&buffer[8], "FULLMAILSCAN", 12) == 0) {
menu[menu_items-1]->command = MENU_FULLMAILSCAN; menu[menu_items-1]->command = MENU_FULLMAILSCAN;
} else if (strncasecmp(&buffer[8], "FILESEARCH", 10) == 0) {
menu[menu_items-1]->command = MENU_FILESEARCH;
} }
} else if (strncasecmp(buffer, "SECLEVEL", 8) == 0) { } else if (strncasecmp(buffer, "SECLEVEL", 8) == 0) {
menu[menu_items-1]->seclevel = atoi(&buffer[9]); menu[menu_items-1]->seclevel = atoi(&buffer[9]);
@ -507,6 +510,9 @@ int menu_system(char *menufile) {
case MENU_FULLMAILSCAN: case MENU_FULLMAILSCAN:
full_mail_scan(gUser); full_mail_scan(gUser);
break; break;
case MENU_FILESEARCH:
file_search();
break;
default: default:
break; break;
} }