serv_puts("RINF");
serv_gets(buf);
if (buf[0] == '1') {
- fmout(NULL);
+ fmout(NULL, "CENTER");
}
}
serv_gets(buf);
if (buf[0] != '2') {
- display_error(&buf[4]);
+ strcpy(WC->ImportantMessage, &buf[4]);
+ display_main_menu();
return;
}
extract(er_name, &buf[4], 0);
if (strcmp(bstr("sc"), "OK")) {
- display_error("Cancelled. Changes were not saved.");
+ strcpy(WC->ImportantMessage,
+ "Cancelled. Changes were not saved.");
+ display_main_menu();
return;
}
serv_puts("GETR");
serv_gets(buf);
if (buf[0] != '2') {
- display_error(&buf[4]);
+ strcpy(WC->ImportantMessage, &buf[4]);
+ display_main_menu();
return;
}
extract(er_name, &buf[4], 0);
serv_puts(buf);
serv_gets(buf);
if (buf[0] != '2') {
- display_error(&buf[4]);
+ strcpy(WC->ImportantMessage, &buf[4]);
+ display_main_menu();
return;
}
gotoroom(er_name, 0);
serv_puts(buf);
serv_gets(buf);
if (buf[0] != '2') {
- display_error(&buf[4]);
+ strcpy(WC->ImportantMessage, &buf[4]);
+ display_main_menu();
return;
}
}
serv_gets(buf);
if (buf[0] != '2') {
- display_error(&buf[4]);
- return;
+ strcpy(WC->ImportantMessage, &buf[4]);
+ display_main_menu();
+ return;
}
extract(room, &buf[4], 0);
strcpy(username, bstr("username"));
- output_headers(1);
- stresc(buf, WC->wc_roomname, 1);
- svprintf("BOXTITLE", WCS_STRING, "Access control list for %s", buf);
- do_template("beginbox");
-
if(!strcmp(bstr("sc"), "Kick")) {
sprintf(buf, "KICK %s", username);
serv_puts(buf);
serv_gets(buf);
if (buf[0] != '2') {
- display_error(&buf[4]);
- return;
+ strcpy(WC->ImportantMessage, &buf[4]);
} else {
- wprintf("<B><I>User %s kicked out of room %s.</I></B>\n",
+ sprintf(WC->ImportantMessage,
+ "<B><I>User %s kicked out of room %s.</I></B>\n",
username, room);
}
} else if(!strcmp(bstr("sc"), "Invite")) {
serv_gets(buf);
if (buf[0] != '2') {
- display_error(&buf[4]);
- return;
+ strcpy(WC->ImportantMessage, &buf[4]);
} else {
- wprintf("<B><I>User %s invited to room %s.</I></B>\n",
+ sprintf(WC->ImportantMessage,
+ "<B><I>User %s invited to room %s.</I></B>\n",
username, room);
}
}
-
+ output_headers(1);
+ stresc(buf, WC->wc_roomname, 1);
+ svprintf("BOXTITLE", WCS_STRING, "Access control list for %s", buf);
+ do_template("beginbox");
wprintf("<TABLE border=0 CELLSPACING=10><TR VALIGN=TOP>"
"<TD>The users listed below have access to this room. "
serv_gets(buf);
if (buf[0] != '2') {
- display_error(&buf[4]);
+ strcpy(WC->ImportantMessage, &buf[4]);
+ display_main_menu();
return;
}
output_headers(3);
serv_printf("MESG roomaccess");
serv_gets(buf);
if (buf[0] == '1') {
- fmout(NULL);
+ fmout(NULL, "CENTER");
}
do_template("endbox");
wDumpContent(1);
int er_num_type;
if (strcmp(bstr("sc"), "OK")) {
- display_error("Cancelled. No new room was created.");
+ strcpy(WC->ImportantMessage,
+ "Cancelled. No new room was created.");
+ display_main_menu();
return;
}
strcpy(er_name, bstr("er_name"));
serv_puts(buf);
serv_gets(buf);
if (buf[0] != '2') {
- display_error(&buf[4]);
+ strcpy(WC->ImportantMessage, &buf[4]);
+ display_main_menu();
return;
}
smart_goto(er_name);
serv_puts("KILL 0");
serv_gets(buf);
if (buf[0] != '2') {
- display_error(&buf[4]);
+ strcpy(WC->ImportantMessage, &buf[4]);
+ display_main_menu();
return;
}
output_headers(1);
strcpy(sc, bstr("sc"));
if (strcasecmp(sc, "Delete")) {
- display_error("Cancelled. This room was not deleted.");
+ strcpy(WC->ImportantMessage,
+ "Cancelled. This room was not deleted.");
+ display_main_menu();
return;
}
serv_puts("KILL 1");
serv_gets(buf);
if (buf[0] != '2') {
- display_error(&buf[4]);
+ strcpy(WC->ImportantMessage, &buf[4]);
+ display_main_menu();
+ return;
} else {
smart_goto("_BASEROOM_");
}
static int columns = 3;
int boxes_per_column = 0;
int current_column = 0;
+ int nf;
- boxes_per_column = (num_floors / columns);
+ nf = num_floors;
+ while (nf % columns != 0) ++nf;
+ boxes_per_column = (nf / columns);
if (boxes_per_column < 1) boxes_per_column = 1;
/* Outer table (for columnization) */