struct CitContext *t_context;
int retval;
- unbuffer_output();
-
if (!(CC->logged_in)) {
cprintf("%d Not logged in.\n", ERROR + NOT_LOGGED_IN);
return;
CC->cs_flags = CC->cs_flags | CS_CHAT;
cprintf("%d Entering chat mode (type '/help' for available commands)\n",
START_CHAT_MODE);
+ unbuffer_output();
MyLastMsg = ChatLastMsg;
if (is_room_aide()) {
cprintf(":|/kick (kick another user out of this room) \n");
}
- cprintf(":|/quit (return to the BBS) \n");
+ cprintf(":|/quit (exit from this chat) \n");
cprintf(":|\n");
ok_cmd = 1;
}
void cmd_sexp(char *argbuf)
{
int message_sent = 0;
- char x_user[SIZ];
- char x_msg[SIZ];
+ char x_user[USERNAME_SIZE];
+ char x_msg[1024];
char *lun; /* <bc> */
char *x_big_msgbuf = NULL;
else
lun = CC->user.fullname;
- extract(x_user, argbuf, 0);
-
- extract(x_msg, argbuf, 1);
+ extract_token(x_user, argbuf, 0, '|', sizeof x_user);
+ extract_token(x_msg, argbuf, 1, '|', sizeof x_msg);
if (!x_user[0]) {
cprintf("%d You were not previously paged.\n", ERROR + NO_SUCH_USER);
SEND_LISTING, message_sent);
x_big_msgbuf = malloc(SIZ);
memset(x_big_msgbuf, 0, SIZ);
- while (client_gets(x_msg), strcmp(x_msg, "000")) {
+ while (client_getln(x_msg, sizeof x_msg),
+ strcmp(x_msg, "000")) {
x_big_msgbuf = realloc(x_big_msgbuf,
strlen(x_big_msgbuf) + strlen(x_msg) + 4);
if (strlen(x_big_msgbuf) > 0)