quiet_mode();
break;
+ case 93:
+ stealth_mode();
+ break;
+
case 50:
enter_config(2);
break;
cmd=75,0,&.,&Wholist,&Roomname
cmd=76,0,&.,&Wholist,&Hostname
cmd=91,0,&.,&Wholist,&Active
+cmd=93,0,&.,&Wholist,&Stealth mode
#
# Command 69 allows the user to enter a server command directly. It is
scr_printf("Quiet mode disabled (other users may page you)\n");
}
}
+
+
+void stealth_mode(void)
+{
+ int qstate;
+ char buf[SIZ];
+
+ serv_puts("STEL 2");
+ serv_gets(buf);
+ if (buf[0] != '2') {
+ scr_printf("%s\n", &buf[4]);
+ return;
+ }
+ qstate = atoi(&buf[4]);
+ if (qstate == 0)
+ qstate = 1;
+ else
+ qstate = 0;
+ snprintf(buf, sizeof buf, "STEL %d", qstate);
+ serv_puts(buf);
+ serv_gets(buf);
+ if (buf[0] != '2') {
+ scr_printf("%s\n", &buf[4]);
+ return;
+ }
+ qstate = atoi(&buf[4]);
+ if (qstate) {
+ scr_printf("Stealth mode enabled (you are invisible)\n");
+ } else {
+ scr_printf("Stealth mode disabled (you are listed as online)\n");
+ }
+}
void chatmode(void);
void page_user(void);
void quiet_mode(void);
+void stealth_mode(void);
extern char last_paged[];
actual name of the room you're in)
<.> <W>holist <H>ostname Masquerade your host name
<.> <E>nter <U>sername Masquerade your user name (Aides only)
+ <.> <W>holist <S>tealth mode Enter/exit "stealth mode" (when in stealth
+ mode you are invisible on the wholist)
Floor commands (if using floor mode)
{
int new_state;
- if (!CC->logged_in) {
- cprintf("%d Not logged in.\n",ERROR+NOT_LOGGED_IN);
- return;
- }
+ if (CtdlAccessCheck(ac_logged_in)) return;
new_state = extract_int(argbuf, 0);
if ((new_state == 0) || (new_state == 1)) {
CC->disable_exp = new_state;
- }
- cprintf("%d %d\n", CIT_OK, CC->disable_exp);
}
+ cprintf("%d %d\n", CIT_OK, CC->disable_exp);
+}
+
/*
* Request client termination
int requested_mode;
requested_mode = extract_int(cmdbuf,0);
- if (requested_mode !=0) requested_mode = 1;
- if (CtdlAccessCheck(ac_aide)) return;
-
- if (CC->cs_flags & CS_STEALTH) {
- if (requested_mode == 0)
- CC->cs_flags = CC->cs_flags-CS_STEALTH;
- }
- else {
- if (requested_mode == 1)
- CC->cs_flags = CC->cs_flags|CS_STEALTH;
- }
+ if (CtdlAccessCheck(ac_logged_in)) return;
- cprintf("%d Ok\n",CIT_OK);
+ if (requested_mode == 1) {
+ CC->cs_flags = CC->cs_flags | CS_STEALTH;
+ }
+ if (requested_mode == 0) {
+ CC->cs_flags = CC->cs_flags & ~CS_STEALTH;
}
+ cprintf("%d %d\n", CIT_OK,
+ ((CC->cs_flags & CS_STEALTH) ? 1 : 0) );
+}
+