X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Froomops.c;h=d54ca16199accb15f7b3a7c0a70c4d5ae14046e8;hb=abeb8adc38f9d55fcb6cb3d076f57239b0a9a4d5;hp=3d40fb3ec30e77429dcd7c1973d5ad8dd6cedbcf;hpb=d96f96eef3dfd036a06a52740b69ba10cede6d30;p=citadel.git diff --git a/webcit/roomops.c b/webcit/roomops.c index 3d40fb3ec..d54ca1619 100644 --- a/webcit/roomops.c +++ b/webcit/roomops.c @@ -63,7 +63,7 @@ void load_floorlist(void) return; } while (serv_gets(buf), strcmp(buf, "000")) { - extract(floorlist[extract_int(buf, 0)], buf, 1); + extract_token(floorlist[extract_int(buf, 0)], buf, 1, '|', sizeof floorlist[0]); } } @@ -180,7 +180,7 @@ void listrms(char *variety) while (serv_gets(buf), strcmp(buf, "000")) { ++num_rooms; rp = malloc(sizeof(struct roomlisting)); - extract(rp->rlname, buf, 0); + extract_token(rp->rlname, buf, 0, '|', sizeof rp->rlname); rp->rlflags = extract_int(buf, 1); rp->rlfloor = extract_int(buf, 2); rp->rlorder = extract_int(buf, 3); @@ -546,7 +546,7 @@ void gotoroom(char *gname) if (buf[0] != '2') { return; } - extract(WC->wc_roomname, &buf[4], 0); + extract_token(WC->wc_roomname, &buf[4], 0, '|', sizeof WC->wc_roomname); WC->room_flags = extract_int(&buf[4], 4); /* highest_msg_read = extract_int(&buf[4],6); maxmsgnum = extract_int(&buf[4],5); @@ -630,7 +630,7 @@ void gotonext(void) while (serv_gets(buf), strcmp(buf, "000")) { mptr = (struct march *) malloc(sizeof(struct march)); mptr->next = NULL; - extract(mptr->march_name, buf, 0); + extract_token(mptr->march_name, buf, 0, '|', sizeof mptr->march_name); mptr->march_floor = extract_int(buf, 2); mptr->march_order = extract_int(buf, 3); if (WC->march == NULL) { @@ -747,9 +747,9 @@ int self_service(int newval) { serv_gets(buf); if (buf[0] != '2') return(0); - extract(name, &buf[4], 0); - extract(password, &buf[4], 1); - extract(dirname, &buf[4], 2); + extract_token(name, &buf[4], 0, '|', sizeof name); + extract_token(password, &buf[4], 1, '|', sizeof password); + extract_token(dirname, &buf[4], 2, '|', sizeof dirname); flags = extract_int(&buf[4], 3); floor = extract_int(&buf[4], 4); order = extract_int(&buf[4], 5); @@ -826,9 +826,9 @@ void display_editroom(void) display_main_menu(); return; } - extract(er_name, &buf[4], 0); - extract(er_password, &buf[4], 1); - extract(er_dirname, &buf[4], 2); + extract_token(er_name, &buf[4], 0, '|', sizeof er_name); + extract_token(er_password, &buf[4], 1, '|', sizeof er_password); + extract_token(er_dirname, &buf[4], 2, '|', sizeof er_dirname); er_flags = extract_int(&buf[4], 3); er_floor = extract_int(&buf[4], 4); @@ -1082,7 +1082,7 @@ void display_editroom(void) if (buf[0] != '2') { wprintf("%s\n", &buf[4]); } else { - extract(er_roomaide, &buf[4], 0); + extract_token(er_roomaide, &buf[4], 0, '|', sizeof er_roomaide); wprintf("\n", er_roomaide); } @@ -1106,7 +1106,7 @@ void display_editroom(void) serv_puts("CONF getsys|application/x-citadel-ignet-config"); serv_gets(buf); if (buf[0]=='1') while (serv_gets(buf), strcmp(buf, "000")) { - extract(node, buf, 0); + extract_token(node, buf, 0, '|', sizeof node); not_shared_with = realloc(not_shared_with, strlen(not_shared_with) + 32); strcat(not_shared_with, node); @@ -1116,9 +1116,9 @@ void display_editroom(void) serv_puts("GNET"); serv_gets(buf); if (buf[0]=='1') while (serv_gets(buf), strcmp(buf, "000")) { - extract(cmd, buf, 0); - extract(node, buf, 1); - extract(remote_room, buf, 2); + extract_token(cmd, buf, 0, '|', sizeof cmd); + extract_token(node, buf, 1, '|', sizeof node); + extract_token(remote_room, buf, 2, '|', sizeof remote_room); if (!strcasecmp(cmd, "ignet_push_share")) { shared_with = realloc(shared_with, strlen(shared_with) + 32); @@ -1132,10 +1132,10 @@ void display_editroom(void) } for (i=0; i 0) { wprintf("
" @@ -1201,7 +1201,7 @@ void display_editroom(void) ); for (i=0; i 0) { wprintf("" @@ -1259,9 +1259,9 @@ void display_editroom(void) serv_puts("GNET"); serv_gets(buf); if (buf[0]=='1') while (serv_gets(buf), strcmp(buf, "000")) { - extract(cmd, buf, 0); + extract_token(cmd, buf, 0, '|', sizeof cmd); if (!strcasecmp(cmd, "listrecp")) { - extract(recp, buf, 1); + extract_token(recp, buf, 1, '|', sizeof recp); escputs(recp); wprintf(" " @@ -1673,7 +1673,7 @@ void display_whok(void) serv_gets(buf); if (buf[0] == '1') { while (serv_gets(buf), strcmp(buf, "000")) { - extract(username, buf, 0); + extract_token(username, buf, 0, '|', sizeof username); wprintf("