" Z Zap (forget) room. (Removes the room from your list)\n"
" + - Goto next, previous room on current floor.\n"
" > < Goto next, previous floor.\n"
- " * Enter any locally installed 'doors'.\n"
" \n"
" In addition, there are dot commands. You hit the . (dot), then press the\n"
"first letter of each word of the command. As you hit the letters, the words\n"
"pop onto your screen. Exceptions: after you hit .Help or .Goto, the remainder\n"
- "of the command is a help file name or room name.\n" " \n" " *** USE .<H>elp ? for additional help *** \n",
+ "of the command is a help file name or room name.\n"
+ " \n"
+ " *** USE .<H>elp ? for additional help *** \n",
"The following commands are available only to Admins. A subset of these\n"
"commands are available to room aides when they are currently in the room\n"
extern int screenwidth, screenheight;
extern int termn8;
extern CtdlIPC *ipc_for_signal_handlers; /* KLUDGE cover your eyes */
-
struct citcmd *cmdlist = NULL;
int enable_color = 0; /* nonzero for ANSI color */
-
-
/*
* If an interesting key has been pressed, return its value, otherwise 0
*/
-char was_a_key_pressed(void)
-{
+char was_a_key_pressed(void) {
fd_set rfds;
struct timeval tv;
int the_character;
set_keepalives(KA_NO);
the_character = inkey();
set_keepalives(KA_YES);
- } else {
+ }
+ else {
the_character = 0;
}
return (the_character);
}
-
-
-
/*
* print_instant() - print instant messages if there are any
*/
-void print_instant(void)
-{
+void print_instant(void) {
char buf[1024];
FILE *outpipe;
time_t timestamp;
char *listing = NULL;
int r; /* IPC result code */
- if (instant_msgs == 0)
+ if (instant_msgs == 0) {
return;
+ }
if (rc_exp_beep) {
ctdl_beep();
}
+
if (IsEmptyStr(rc_exp_cmd)) {
color(BRIGHT_RED);
scr_printf("\r---");
while (instant_msgs != 0) {
r = CtdlIPCGetInstantMessage(ipc_for_signal_handlers, &listing, buf);
- if (r / 100 != 1)
+ if (r / 100 != 1) {
return;
+ }
instant_msgs = extract_int(buf, 0);
timestamp = extract_long(buf, 1);
}
-void set_keepalives(int s)
-{
+void set_keepalives(int s) {
keepalives_enabled = (char) s;
}
+
/*
* This loop handles the "keepalive" messages sent to the server when idling.
*/
-
static time_t idlet = 0;
-static void really_do_keepalive(void)
-{
-
+static void really_do_keepalive(void) {
time(&idlet);
/* This may sometimes get called before we are actually connected
}
}
+
/* I changed this from static to not because I need to call it from
* screen.c, either that or make something in screen.c not static.
* Fix it how you like. Why all the staticness? stu
}
-
int inkey(void)
{ /* get a character from the keyboard, with */
int a; /* the watchdog timer in effect if necessary */
/*
* Read a message from the server
*/
-int read_message(CtdlIPC * ipc, long num, /* message number */
- int pagin, /* 0 = normal read, 1 = read with pagination, 2 = header */
- FILE * dest)
-{ /* Destination file, NULL for screen */
+int read_message(CtdlIPC *ipc,
+ long num, /* message number */
+ int pagin, /* 0 = normal read, 1 = read with pagination, 2 = header */
+ FILE *dest /* Destination file, NULL for screen */
+) {
char buf[SIZ];
char now[256];
int format_type = 0;
if (dest) {
fprintf(dest, "\n ");
- } else {
+ }
+ else {
scr_printf("\n");
if (pagin != 2) {
scr_printf(" ");
if (!IsEmptyStr(message->email)) {
scr_printf("rfca=%s\n", message->email);
}
- scr_printf("room=%s\ntime=%s", message->room, asctime(localtime(&message->time))
- );
+ scr_printf("room=%s\ntime=%s", message->room, asctime(localtime(&message->time)));
if (!IsEmptyStr(message->recipient)) {
scr_printf("rcpt=%s\n", message->recipient);
}
if (nhdr == 1 && !is_room_aide) {
if (dest) {
fprintf(dest, " ****");
- } else {
+ }
+ else {
scr_printf(" ****");
}
- } else {
+ }
+ else {
struct tm thetime;
localtime_r(&message->time, &thetime);
strftime(now, sizeof now, "%F %R", &thetime);
if (!IsEmptyStr(message->email)) {
fprintf(dest, "<%s> ", message->email);
}
- } else {
+ }
+ else {
color(BRIGHT_CYAN);
scr_printf("%s ", now);
color(DIM_WHITE);