int haschar(const char *st, int ch);
void getline(char *string, int lim);
int file_checksum(char *filename);
-void do_edit(char *desc, char *read_cmd, char *check_cmd, char *write_cmd);
void progress(unsigned long curr, unsigned long cmax);
unsigned long *msg_arr = NULL;
/*
* View and edit a system message
*/
-void edit_system_message(char *which_message)
+void edit_system_message(CtdlIPC *ipc, char *which_message)
{
- char desc[64];
- char read_cmd[64];
- char write_cmd[64];
+ char desc[SIZ];
+ char read_cmd[SIZ];
+ char write_cmd[SIZ];
snprintf(desc, sizeof desc, "system message '%s'", which_message);
snprintf(read_cmd, sizeof read_cmd, "MESG %s", which_message);
snprintf(write_cmd, sizeof write_cmd, "EMSG %s", which_message);
- do_edit(desc, read_cmd, "NOOP", write_cmd);
+ do_edit(ipc, desc, read_cmd, "NOOP", write_cmd);
}
newfloor = (-1);
safestrncpy(floorstr, floorlist[rfloor],
sizeof floorstr);
+ strprompt("Which floor", floorstr, 255);
for (a = 0; a < 128; ++a) {
if (!strcasecmp
(floorstr, &floorlist[a][0]))
} while (newfloor < 0);
return (newfloor);
}
+
+ else {
+ scr_printf("Floor selection bypassed because you have "
+ "floor mode disabled.\n");
+ }
+
return (rfloor);
}
/* Now interact with the user. */
+ strprompt("Room name", attr->QRname, ROOMNAMELEN-1);
attr->QRfloor = select_floor(ipc, attr->QRfloor);
attr->QRflags = set_room_attr(ipc, attr->QRflags, "Private room", QR_PRIVATE);
if (attr->QRflags & QR_PRIVATE) {
rbump = boolprompt("Cause current users to forget room", 0);
}
- attr->QRflags = set_room_attr(ipc, attr->QRflags, "Preferred users only", QR_PREFONLY);
- attr->QRflags = set_room_attr(ipc, attr->QRflags, "Read-only room", QR_READONLY);
- attr->QRflags = set_room_attr(ipc, attr->QRflags, "Directory room", QR_DIRECTORY);
- attr->QRflags = set_room_attr(ipc, attr->QRflags, "Permanent room", QR_PERMANENT);
+ attr->QRflags = set_room_attr(ipc, attr->QRflags,
+ "Preferred users only", QR_PREFONLY);
+ attr->QRflags = set_room_attr(ipc, attr->QRflags,
+ "Read-only room", QR_READONLY);
+ attr->QRflags = set_room_attr(ipc, attr->QRflags,
+ "Directory room", QR_DIRECTORY);
+ attr->QRflags = set_room_attr(ipc, attr->QRflags,
+ "Permanent room", QR_PERMANENT);
if (attr->QRflags & QR_DIRECTORY) {
strprompt("Directory name", attr->QRdirname, 14);
attr->QRflags =
- set_room_attr(ipc, attr->QRflags, "Uploading allowed", QR_UPLOAD);
+ set_room_attr(ipc, attr->QRflags,
+ "Uploading allowed", QR_UPLOAD);
attr->QRflags =
set_room_attr(ipc, attr->QRflags, "Downloading allowed",
QR_DOWNLOAD);
attr->QRflags =
- set_room_attr(ipc, attr->QRflags, "Visible directory", QR_VISDIR);
+ set_room_attr(ipc, attr->QRflags,
+ "Visible directory", QR_VISDIR);
}
- attr->QRflags = set_room_attr(ipc, attr->QRflags, "Network shared room", QR_NETWORK);
+ attr->QRflags = set_room_attr(ipc, attr->QRflags,
+ "Network shared room", QR_NETWORK);
attr->QRflags2 = set_room_attr(ipc, attr->QRflags2,
"Self-service list subscribe/unsubscribe",
QR2_SELFLIST);
char cmd[SIZ];
int b, cksum, editor_exit;
-
if (strlen(editor_path) == 0) {
scr_printf("Do you wish to re-enter %s? ", desc);
if (yesno() == 0)