Index: etc/param =================================================================== RCS file: /var/lib/cvs/public/bbs100-1.2/etc/param,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- etc/param 12 Dec 2003 04:11:38 -0000 1.1 +++ etc/param 9 Jan 2004 13:29:04 -0000 1.2 @@ -69,5 +69,6 @@ notify_unlocked has returned to the terminal notify_enter_chat enters through a dimensional gateway notify_leave_chat leaves through a dimensional gateway +use_emotes true # EOB Index: src/Param.c =================================================================== RCS file: /var/lib/cvs/public/bbs100-1.2/src/Param.c,v retrieving revision 1.1 retrieving revision 1.3 diff -u -r1.1 -r1.3 --- src/Param.c 12 Dec 2003 04:11:38 -0000 1.1 +++ src/Param.c 9 Jan 2004 06:04:59 -0000 1.3 @@ -106,6 +106,7 @@ { PARAM_STRING, "notify_unlocked", { NULL }, { "has returned to the terminal" }, }, { PARAM_STRING, "notify_enter_chat",{ NULL }, { "enters" }, }, { PARAM_STRING, "notify_leave_chat",{ NULL }, { "leaves" }, }, + { PARAM_STRING, "use_emotes", { NULL }, { "false" }, }, }; Index: src/Stats.c =================================================================== RCS file: /var/lib/cvs/public/bbs100-1.2/src/Stats.c,v retrieving revision 1.1 retrieving revision 1.3 diff -u -r1.1 -r1.3 --- src/Stats.c 12 Dec 2003 04:11:38 -0000 1.1 +++ src/Stats.c 9 Jan 2004 06:04:59 -0000 1.3 @@ -425,8 +425,10 @@ usr->more_text = add_String(&usr->more_text, "Most logins are by %-*s: %s", w, stats.most_logins, print_number(stats.logins)); usr->more_text = add_String(&usr->more_text, "Most eXpress Messages were sent by %-*s: %s", w, stats.most_xsent, print_number(stats.xsent)); usr->more_text = add_String(&usr->more_text, "Most eXpress Messages were received by %-*s: %s", w, stats.most_xrecv, print_number(stats.xrecv)); - usr->more_text = add_String(&usr->more_text, "Most emotes were sent by %-*s: %s", w, stats.most_esent, print_number(stats.esent)); - usr->more_text = add_String(&usr->more_text, "Most emotes were received by %-*s: %s", w, stats.most_erecv, print_number(stats.erecv)); + if (!strcmp(PARAM_USE_EMOTES, "true")) { + usr->more_text = add_String(&usr->more_text, "Most emotes were sent by %-*s: %s", w, stats.most_esent, print_number(stats.esent)); + usr->more_text = add_String(&usr->more_text, "Most emotes were received by %-*s: %s", w, stats.most_erecv, print_number(stats.erecv)); + } usr->more_text = add_String(&usr->more_text, "Most Feelings were sent by %-*s: %s", w, stats.most_fsent, print_number(stats.fsent)); usr->more_text = add_String(&usr->more_text, "Most Feelings were received by %-*s: %s", w, stats.most_frecv, print_number(stats.frecv)); usr->more_text = add_String(&usr->more_text, "Most messages were posted by %-*s: %s", w, stats.most_posted, print_number(stats.posted)); @@ -440,9 +442,11 @@ sprintf(buf+l, " received: %s", print_number(usr->xrecv)); usr->more_text = add_StringList(&usr->more_text, new_StringList(buf)); - l = sprintf(buf, "Emotes sent : %-15s", print_number(usr->esent)); - sprintf(buf+l, " received: %s", print_number(usr->erecv)); - usr->more_text = add_StringList(&usr->more_text, new_StringList(buf)); + if (!strcmp(PARAM_USE_EMOTES, "true")) { + l = sprintf(buf, "Emotes sent : %-15s", print_number(usr->esent)); + sprintf(buf+l, " received: %s", print_number(usr->erecv)); + usr->more_text = add_StringList(&usr->more_text, new_StringList(buf)); + } l = sprintf(buf, "Feelings sent : %-15s", print_number(usr->fsent)); sprintf(buf+l, " received: %s", print_number(usr->frecv)); Index: src/state.c =================================================================== RCS file: /var/lib/cvs/public/bbs100-1.2/src/state.c,v retrieving revision 1.7 retrieving revision 1.9 diff -u -r1.7 -r1.9 --- src/state.c 4 Jan 2004 20:58:53 -0000 1.7 +++ src/state.c 9 Jan 2004 06:04:59 -0000 1.9 @@ -370,14 +370,16 @@ case ':': case ';': - Put(usr, "Emote\n"); - if (is_guest(usr->name)) { - Print(usr, "Sorry, but the %s user cannot send emotes\n", PARAM_NAME_GUEST); - break; + if (!strcmp(PARAM_USE_EMOTES, "true")) { + Put(usr, "Emote\n"); + if (is_guest(usr->name)) { + Print(usr, "Sorry, but the %s user cannot send emotes\n", PARAM_NAME_GUEST); + break; + } + Put(usr, ""); + enter_recipients(usr, STATE_EMOTE_PROMPT); } - Put(usr, ""); - enter_recipients(usr, STATE_EMOTE_PROMPT); - Return; + Return; case '*': Put(usr, "Feelings\n"); Index: src/state_sysop.c =================================================================== RCS file: /var/lib/cvs/public/bbs100-1.2/src/state_sysop.c,v retrieving revision 1.7 retrieving revision 1.9 diff -u -r1.7 -r1.9 --- src/state_sysop.c 5 Jan 2004 03:03:59 -0000 1.7 +++ src/state_sysop.c 9 Jan 2004 06:04:59 -0000 1.9 @@ -1476,6 +1476,10 @@ PARAM_PROGRAM_RESOLVER, PARAM_PROGRAM_LOGD ); + Print(usr, "\n" + "Use emotes %s\n", + PARAM_USE_EMOTES + ); break; case ' ': @@ -1565,6 +1569,12 @@ CALL(usr, STATE_PARAM_PROGRAM_LOGD); Return; + case 'e': + case 'E': + Put(usr, "Use emotes\n"); + CALL(usr, STATE_PARAM_USE_EMOTES); + Return; + } Print(usr, "\n[%s] Sysconf# ", PARAM_NAME_SYSOP); Return; @@ -1649,7 +1659,11 @@ Return; } - +void state_param_use_emotes(User *usr, char c) { + Enter(state_param_use_emotes); + change_string_param(usr, c, &PARAM_USE_EMOTES, "Should emotes be enabled: "); + Return; +} void state_config_files_menu(User *usr, char c) { if (usr == NULL) Index: src/include/Param.h =================================================================== RCS file: /var/lib/cvs/public/bbs100-1.2/src/include/Param.h,v retrieving revision 1.1 retrieving revision 1.3 diff -u -r1.1 -r1.3 --- src/include/Param.h 12 Dec 2003 04:11:38 -0000 1.1 +++ src/include/Param.h 9 Jan 2004 06:04:59 -0000 1.3 @@ -98,6 +98,8 @@ #define PARAM_NOTIFY_ENTER_CHAT param[56].val.s #define PARAM_NOTIFY_LEAVE_CHAT param[57].val.s +#define PARAM_USE_EMOTES param[58].val.s + #define DEFAULT_PORT_1234 1234 /* default port number */ #define DEFAULT_MAX_CACHED 256 /* max # of objects in cache */ @@ -113,6 +115,8 @@ #define DEFAULT_LOCK_TIMEOUT 30 /* 30 minute timeout */ #define DEFAULT_SAVE_TIMEOUT 5 /* save user every 5 minutes */ #define DEFAULT_USERHASH_SIZE 16 /* good for small and medium sized BBSes */ + +#define DEFAULT_USE_EMOTES false typedef union { char *str; Index: src/include/state_sysop.h =================================================================== RCS file: /var/lib/cvs/public/bbs100-1.2/src/include/state_sysop.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- src/include/state_sysop.h 12 Dec 2003 04:11:38 -0000 1.1 +++ src/include/state_sysop.h 9 Jan 2004 06:04:59 -0000 1.2 @@ -119,6 +119,8 @@ #define STATE_PARAM_NOTIFY_ENTER_CHAT state_param_notify_enter_chat #define STATE_PARAM_NOTIFY_LEAVE_CHAT state_param_notify_leave_chat +#define STATE_PARAM_USE_EMOTES state_param_use_emotes + void state_sysop_menu(User *, char); void state_disconnect_user(User *, char); void state_nuke_user(User *, char); @@ -209,6 +211,7 @@ void state_param_notify_unlocked(User *, char); void state_param_notify_enter_chat(User *, char); void state_param_notify_leave_chat(User *, char); +void state_param_use_emotes(User *, char); void change_int_param(User *, char, unsigned int *); void change_string_param(User *, char, char **, char *);