Added abiltiy to change default archiver
This commit is contained in:
parent
02bcdf87cc
commit
b18e9ee10e
@ -203,3 +203,7 @@ Is this Correct? (Y/N)
|
||||
\e[1;32mUpload Successful!\e[0m\r\n
|
||||
\e[1;31mUser not found! Assuming new user...\e[0m\r\n\r\n
|
||||
\e[1;32mSuccesfully processed \e[1;37m%d \e[1;32mmessages!\r\n\e[0m
|
||||
\e[0;36mA. \e[1;37mDefault Archiver (\e[1;33m%s\e[1;37m)\r\n
|
||||
\r\n\e[1;32mSelect an archiver...\e[0m\r\n\r\n
|
||||
\e[1;31m%d. \e[1;37m%s\e[0m\r\n
|
||||
>
|
||||
|
25
settings.c
25
settings.c
@ -4,17 +4,22 @@
|
||||
#include <ctype.h>
|
||||
#include "bbs.h"
|
||||
|
||||
extern struct bbs_config conf;
|
||||
|
||||
void settings_menu(struct user_record *user) {
|
||||
char buffer[256];
|
||||
int dosettings = 0;
|
||||
char c;
|
||||
char *hash;
|
||||
int new_arc;
|
||||
int i;
|
||||
|
||||
while (!dosettings) {
|
||||
s_printf(get_string(149));
|
||||
s_printf(get_string(150));
|
||||
s_printf(get_string(151));
|
||||
s_printf(get_string(152), user->location);
|
||||
s_printf(get_string(205), conf.archivers[user->defarchiver - 1]->name);
|
||||
s_printf(get_string(153));
|
||||
s_printf(get_string(154));
|
||||
|
||||
@ -64,6 +69,26 @@ void settings_menu(struct user_record *user) {
|
||||
save_user(user);
|
||||
}
|
||||
break;
|
||||
case 'a':
|
||||
{
|
||||
s_printf(get_string(206));
|
||||
|
||||
for (i=0;i<conf.archiver_count;i++) {
|
||||
s_printf(get_string(207), i + 1, conf.archivers[i]->name);
|
||||
}
|
||||
|
||||
s_printf(get_string(208));
|
||||
s_readstring(buffer, 5);
|
||||
new_arc = atoi(buffer);
|
||||
|
||||
if (new_arc - 1 < 0 || new_arc > conf.archiver_count) {
|
||||
break;
|
||||
} else {
|
||||
user->defarchiver = new_arc;
|
||||
save_user(user);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'q':
|
||||
dosettings = 1;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user