$Log$
+ Revision 573.34 2000/11/27 14:12:09 error
+ * commands.c: fixups to print_express() to make external command not print
+ extraneous stuff to the terminal and make the displayed message consistent
+
Revision 573.33 2000/11/27 10:41:14 error
* print_express(): now uses GEXP instead of old PEXP; displays timestamps
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
if (rc_exp_beep) {
putc(7, stdout);
}
- color(BRIGHT_RED);
- printf("\r---");
+ if (strlen(rc_exp_cmd) == 0) {
+ color(BRIGHT_RED);
+ printf("\r---");
+ }
while (express_msgs != 0) {
serv_puts("GEXP");
fprintf(outpipe, "Chat request ");
else
fprintf(outpipe, "Message ");
- /* 24hr format. Can be changed, I guess. */
- fprintf(outpipe, "at %d:%02d from %s @%s:\n",
- stamp->tm_hour, stamp->tm_min,
- sender, node);
+ /* Timestamp. Can this be improved? */
+ if (stamp->tm_hour == 0 || stamp->tm_hour == 12)
+ fprintf(outpipe, "at 12:%02d%cm",
+ stamp->tm_min,
+ stamp->tm_hour ? 'p' : 'a');
+ else if (stamp->tm_hour > 12) /* pm */
+ fprintf(outpipe, "at %d:%02dpm",
+ stamp->tm_hour - 12,
+ stamp->tm_min);
+ else /* am */
+ fprintf(outpipe, "at %d:%02dam",
+ stamp->tm_hour, stamp->tm_min);
+ fprintf(outpipe, " from %s", sender);
+ if (strncmp(serv_info.serv_nodename, node, 32))
+ fprintf(outpipe, " @%s", node);
+ fprintf(outpipe, ":\n");
while (serv_gets(buf), strcmp(buf, "000")) {
fprintf(outpipe, "%s\n", buf);
}
pclose(outpipe);
- return;
+ if (express_msgs == 0)
+ return;
+ continue;
}
}
/* fall back to built-in express message display */