X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Froomops.c;h=7014040f17c02edf88e349619b798bae1fc4f82a;hb=d113532edf96d15e1cc025c0e7bde57214b524d6;hp=a6005641de2a466d38c30fee7adca94a2b242843;hpb=0596c6d9b3e9dda73beaa239e6349478667d267d;p=citadel.git
diff --git a/webcit/roomops.c b/webcit/roomops.c
index a6005641d..7014040f1 100644
--- a/webcit/roomops.c
+++ b/webcit/roomops.c
@@ -1,19 +1,19 @@
/*
* $Id$
+ * Lots of different room-related operations.
*/
-/**
- * \defgroup RoomOps Lots of different room-related operations.
- * \ingroup CitadelCommunitacion
- */
-/*@{*/
+
#include "webcit.h"
+#include "webserver.h"
+#define MAX_FLOORS 128
+char floorlist[MAX_FLOORS][SIZ]; /**< list of our floor names */
-char floorlist[128][SIZ]; /**< list of our floor names */
+char *viewdefs[9]; /**< the different kinds of available views */
-char *viewdefs[8]; /**< the different kinds of available views */
+void display_whok(void);
-/**
- * \brief initialize the viewdefs with localized strings
+/*
+ * Initialize the viewdefs with localized strings
*/
void initialize_viewdefs(void) {
viewdefs[0] = _("Bulletin Board");
@@ -24,12 +24,11 @@ void initialize_viewdefs(void) {
viewdefs[5] = _("Notes List");
viewdefs[6] = _("Wiki");
viewdefs[7] = _("Calendar List");
+ viewdefs[8] = _("Journal");
}
-/**
- * \brief Determine which views are allowed as the default for creating a new room.
- *
- * \param which_view The view ID being queried.
+/*
+ * Determine which views are allowed as the default for creating a new room.
*/
int is_view_allowed_as_default(int which_view)
{
@@ -40,22 +39,29 @@ int is_view_allowed_as_default(int which_view)
case VIEW_CALENDAR: return(1);
case VIEW_TASKS: return(1);
case VIEW_NOTES: return(1);
- case VIEW_WIKI: return(0); /**< because it isn't finished yet */
+
+#ifdef TECH_PREVIEW
+ case VIEW_WIKI: return(1);
+#else /* TECH_PREVIEW */
+ case VIEW_WIKI: return(0); /* because it isn't finished yet */
+#endif /* TECH_PREVIEW */
+
case VIEW_CALBRIEF: return(0);
- default: return(0); /**< should never get here */
+ case VIEW_JOURNAL: return(0);
+ default: return(0); /* should never get here */
}
}
-/**
- * \brief load the list of floors
+/*
+ * load the list of floors
*/
void load_floorlist(void)
{
int a;
char buf[SIZ];
- for (a = 0; a < 128; ++a)
+ for (a = 0; a < MAX_FLOORS; ++a)
floorlist[a][0] = 0;
serv_puts("LFLR");
@@ -70,10 +76,8 @@ void load_floorlist(void)
}
-/**
- * \brief Free a session's march list
- *
- * \param wcf Pointer to session being cleared
+/*
+ * Free a session's march list
*/
void free_march_list(struct wcsession *wcf)
{
@@ -89,8 +93,8 @@ void free_march_list(struct wcsession *wcf)
-/**
- * \brief remove a room from the march list
+/*
+ * remove a room from the march list
*/
void remove_march(char *aaa)
{
@@ -120,9 +124,8 @@ void remove_march(char *aaa)
-/**
- * \brief display rooms in tree structure???
- * \param rp the roomlist to build a tree from
+/*
+ * display rooms in tree structure
*/
void room_tree_list(struct roomlisting *rp)
{
@@ -151,7 +154,7 @@ void room_tree_list(struct roomlisting *rp)
wprintf(")");
else
wprintf(">");
- wprintf("\n");
+ wprintf("\n");
room_tree_list(rp->rnext);
free(rp);
@@ -253,16 +256,16 @@ void listrms(char *variety)
*/
void zapped_list(void)
{
- output_headers(1, 1, 0, 0, 0, 0);
+ output_headers(1, 1, 1, 0, 0, 0);
- svprintf("BOXTITLE", WCS_STRING, _("Zapped (forgotten) rooms"));
- do_template("beginbox");
+ svput("BOXTITLE", WCS_STRING, _("Zapped (forgotten) rooms"));
+ do_template("beginbox", NULL);
listrms("LZRM -1");
wprintf("
\n");
wprintf(_("Click on any room to un-zap it and goto that room.\n"));
- do_template("endbox");
+ do_template("endbox", NULL);
wDumpContent(1);
}
@@ -325,44 +328,44 @@ void embed_room_graphic(void) {
serv_puts("OIMG _roompic_");
serv_getln(buf, sizeof buf);
if (buf[0] == '2') {
- wprintf("wc_roomname);
wprintf("\">");
serv_puts("CLOS");
serv_getln(buf, sizeof buf);
}
else if (WC->wc_view == VIEW_ADDRESSBOOK) {
- wprintf(""
);
}
else if ( (WC->wc_view == VIEW_CALENDAR) || (WC->wc_view == VIEW_CALBRIEF) ) {
- wprintf(""
);
}
else if (WC->wc_view == VIEW_TASKS) {
- wprintf(""
);
}
else if (WC->wc_view == VIEW_NOTES) {
- wprintf(""
);
}
else if (WC->wc_view == VIEW_MAILBOX) {
- wprintf(""
);
}
else {
- wprintf(""
);
@@ -379,7 +382,7 @@ void embed_view_o_matic(void) {
int i;
wprintf("
\n");
}
@@ -418,14 +421,15 @@ void embed_view_o_matic(void) {
*/
void embed_search_o_matic(void) {
wprintf("\n");
}
@@ -439,7 +443,10 @@ void embed_search_o_matic(void) {
void embed_room_banner(char *got, int navbar_style) {
char buf[256];
-
+ char buf2[1024];
+ char with_files[256];
+ int file_count=0;
+
/**
* We need to have the information returned by a GOTO server command.
* If it isn't supplied, we fake it by issuing our own GOTO.
@@ -469,28 +476,43 @@ void embed_room_banner(char *got, int navbar_style) {
WC->new_mail = extract_int(&got[4], 9);
WC->wc_view = extract_int(&got[4], 11);
- stresc(buf, WC->wc_roomname, 1, 1);
- svprintf("ROOMNAME", WCS_STRING, "%s", buf);
- svprintf("NUMMSGS", WCS_STRING,
- _("%d new of %d messages"),
+ /* Is this a directory room and does it contain files and how many? */
+ if ((WC->room_flags & QR_DIRECTORY) && (WC->room_flags & QR_VISDIR))
+ {
+ serv_puts("RDIR");
+ serv_getln(buf2, sizeof buf2);
+ if (buf2[0] == '1') while (serv_getln(buf2, sizeof buf2), strcmp(buf2, "000"))
+ file_count++;
+ snprintf (with_files, sizeof with_files,
+ "; %d %s ",
+ file_count,
+ ((file_count>1) || (file_count == 0) ? _("files") : _("file")));
+ }
+ else
+ strcpy (with_files, "");
+
+ svprintf(HKEY("NUMMSGS"), WCS_STRING,
+ _("%d new of %d messages%s"),
extract_int(&got[4], 1),
- extract_int(&got[4], 2)
+ extract_int(&got[4], 2),
+ with_files
);
svcallback("ROOMPIC", embed_room_graphic);
svcallback("ROOMINFO", readinfo);
- svcallback("VIEWOMATIC", embed_view_o_matic);
+ svcallback("VIEWOMATIC", embed_view_o_matic);
svcallback("SEARCHOMATIC", embed_search_o_matic);
- svcallback("START", offer_start_page);
-
- do_template("roombanner");
- if (navbar_style != navbar_none) {
+ svcallback("START", offer_start_page);
+
+ do_template("roombanner", NULL);
+ // roombanner contains this for mobile
+ if (navbar_style != navbar_none && !WC->is_mobile) {
wprintf("
");
if (navbar_style == navbar_default) wprintf(
"
\n", _("Add new contact")
);
@@ -622,12 +644,12 @@ void embed_room_banner(char *got, int navbar_style) {
case VIEW_CALENDAR:
case VIEW_CALBRIEF:
wprintf("
\n",
_("Leave all messages marked as unread, go to next room with unread messages"),
@@ -702,7 +724,7 @@ void embed_room_banner(char *got, int navbar_style) {
"
\n",
_("Mark all messages as read, go to next room with unread messages"),
@@ -715,10 +737,8 @@ void embed_room_banner(char *got, int navbar_style) {
}
-/**
- * \brief back end routine to take the session to a new room
- * \param gname room to go to
- *
+/*
+ * back end routine to take the session to a new room
*/
int gotoroom(char *gname)
{
@@ -726,7 +746,7 @@ int gotoroom(char *gname)
static long ls = (-1L);
int err = 0;
- /** store ungoto information */
+ /* store ungoto information */
strcpy(WC->ugname, WC->wc_roomname);
WC->uglsn = ls;
@@ -812,8 +832,9 @@ char *pop_march(int desired_floor)
-/**
- *\brief Goto next room having unread messages.
+/*
+ * Goto next room having unread messages.
+ *
* We want to skip over rooms that the user has already been to, and take the
* user back to the lobby when done. The room we end up in is placed in
* newroom - which is set to 0 (the lobby) initially.
@@ -823,11 +844,13 @@ char *pop_march(int desired_floor)
void gotonext(void)
{
char buf[256];
- struct march *mptr, *mptr2;
+ struct march *mptr = NULL;
+ struct march *mptr2 = NULL;
char room_name[128];
char next_room[128];
+ int ELoop = 0;
- /**
+ /*
* First check to see if the march-mode list is already allocated.
* If it is, pop the first room off the list and go there.
*/
@@ -837,6 +860,14 @@ void gotonext(void)
serv_getln(buf, sizeof buf);
if (buf[0] == '1')
while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) {
+ if (IsEmptyStr(buf)) {
+ if (ELoop > 10000)
+ return;
+ if (ELoop % 100 == 0)
+ sleeeeeeeeeep(1);
+ ELoop ++;
+ continue;
+ }
extract_token(room_name, buf, 0, '|', sizeof room_name);
if (strcasecmp(room_name, WC->wc_roomname)) {
mptr = (struct march *) malloc(sizeof(struct march));
@@ -844,22 +875,22 @@ void gotonext(void)
safestrncpy(mptr->march_name, room_name, sizeof mptr->march_name);
mptr->march_floor = extract_int(buf, 2);
mptr->march_order = extract_int(buf, 3);
- if (WC->march == NULL) {
+ if (WC->march == NULL)
WC->march = mptr;
- } else {
- mptr2 = WC->march;
- while (mptr2->next != NULL)
- mptr2 = mptr2->next;
+ else
mptr2->next = mptr;
- }
+ mptr2 = mptr;
}
+ buf[0] = '\0';
}
- /**
+ /*
* add _BASEROOM_ to the end of the march list, so the user will end up
* in the system base room (usually the Lobby>) at the end of the loop
*/
mptr = (struct march *) malloc(sizeof(struct march));
mptr->next = NULL;
+ mptr->march_order = 0;
+ mptr->march_floor = 0;
strcpy(mptr->march_name, "_BASEROOM_");
if (WC->march == NULL) {
WC->march = mptr;
@@ -869,7 +900,7 @@ void gotonext(void)
mptr2 = mptr2->next;
mptr2->next = mptr;
}
- /**
+ /*
* ...and remove the room we're currently in, so a oto doesn't make us
* walk around in circles
*/
@@ -886,9 +917,8 @@ void gotonext(void)
}
-/**
- * \brief goto next room
- * \param next_room next room to go to
+/*
+ * goto next room
*/
void smart_goto(char *next_room) {
gotoroom(next_room);
@@ -897,8 +927,8 @@ void smart_goto(char *next_room) {
-/**
- * \brief mark all messages in current room as having been read
+/*
+ * mark all messages in current room as having been read
*/
void slrp_highest(void)
{
@@ -909,8 +939,8 @@ void slrp_highest(void)
}
-/**
- * \brief un-goto the previous room
+/*
+ * un-goto the previous room
*/
void ungoto(void)
{
@@ -935,15 +965,25 @@ void ungoto(void)
smart_goto(buf);
}
+typedef struct __room_states {
+ char password[SIZ];
+ char dirname[SIZ];
+ char name[SIZ];
+ int flags;
+ int floor;
+ int order;
+ int view;
+ int flags2;
+} room_states;
-/**
- * \brief Set/clear/read the "self-service list subscribe" flag for a room
+/*
+ * Set/clear/read the "self-service list subscribe" flag for a room
*
- * \param newval set to 0 to clear, 1 to set, any other value to leave unchanged.
- * \return return the new value.
+ * set newval to 0 to clear, 1 to set, any other value to leave unchanged.
+ * returns the new value.
*/
int self_service(int newval) {
@@ -953,7 +993,7 @@ int self_service(int newval) {
char name[SIZ];
char password[SIZ];
char dirname[SIZ];
- int flags, floor, order, view, flags2;
+ int flags, floor, order, view, flags2;
serv_puts("GETR");
serv_getln(buf, sizeof buf);
@@ -996,13 +1036,71 @@ int self_service(int newval) {
}
+int is_selflist(room_states *RoomFlags)
+{
+ return ((RoomFlags->flags2 & QR2_SELFLIST) != 0);
+}
+
+int is_publiclist(room_states *RoomFlags)
+{
+ return ((RoomFlags->flags2 & QR2_SMTP_PUBLIC) != 0);
+}
+
+int is_moderatedlist(room_states *RoomFlags)
+{
+ return ((RoomFlags->flags2 & QR2_MODERATED) != 0);
+}
+
+/*
+ * Set/clear/read the "self-service list subscribe" flag for a room
+ *
+ * set newval to 0 to clear, 1 to set, any other value to leave unchanged.
+ * returns the new value.
+ */
+
+int get_roomflags(room_states *RoomOps)
+{
+ char buf[SIZ];
+
+ serv_puts("GETR");
+ serv_getln(buf, sizeof buf);
+ if (buf[0] != '2') return(0);
+ extract_token(RoomOps->name, &buf[4], 0, '|', sizeof RoomOps->name);
+ extract_token(RoomOps->password, &buf[4], 1, '|', sizeof RoomOps->password);
+ extract_token(RoomOps->dirname, &buf[4], 2, '|', sizeof RoomOps->dirname);
+ RoomOps->flags = extract_int(&buf[4], 3);
+ RoomOps->floor = extract_int(&buf[4], 4);
+ RoomOps->order = extract_int(&buf[4], 5);
+ RoomOps->view = extract_int(&buf[4], 6);
+ RoomOps->flags2 = extract_int(&buf[4], 7);
+ return (1);
+}
+int set_roomflags(room_states *RoomOps)
+{
+ char buf[SIZ];
+ serv_printf("SETR %s|%s|%s|%d|0|%d|%d|%d|%d",
+ RoomOps->name,
+ RoomOps->password,
+ RoomOps->dirname,
+ RoomOps->flags,
+ RoomOps->floor,
+ RoomOps->order,
+ RoomOps->view,
+ RoomOps->flags2);
+ serv_getln(buf, sizeof buf);
+ return (1);
+}
-/**
- * \brief display the form for editing a room
+
+
+
+
+/*
+ * display the form for editing a room
*/
void display_editroom(void)
{
@@ -1026,344 +1124,390 @@ void display_editroom(void)
int roomvalue = 0;
int floorpolicy = 0;
int floorvalue = 0;
+ char pop3_host[128];
+ char pop3_user[32];
+ int bg = 0;
tab = bstr("tab");
- if (strlen(tab) == 0) tab = "admin";
+ if (IsEmptyStr(tab)) tab = "admin";
load_floorlist();
- serv_puts("GETR");
- serv_getln(buf, sizeof buf);
-
- if (buf[0] != '2') {
- strcpy(WC->ImportantMessage, &buf[4]);
- display_main_menu();
- return;
- }
- 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);
- er_flags2 = extract_int(&buf[4], 7);
-
output_headers(1, 1, 1, 0, 0, 0);
- /** print the tabbed dialog */
- wprintf(" "
- "
");
+ wprintf("");
}
if (!strcmp(tab, "config")) {
- wprintf("
\n");
+
+ /* end content of whatever tab is open now */
+ wprintf("
\n");
address_book_popup();
wDumpContent(1);
}
-/**
- * \brief Toggle self-service list subscription
+/*
+ * Toggle self-service list subscription
*/
void toggle_self_service(void) {
- int newval = 0;
+ room_states RoomFlags;
+
+ get_roomflags (&RoomFlags);
+
+ if (yesbstr("QR2_SelfList"))
+ RoomFlags.flags2 = RoomFlags.flags2 | QR2_SELFLIST;
+ else
+ RoomFlags.flags2 = RoomFlags.flags2 & ~QR2_SELFLIST;
+
+ if (yesbstr("QR2_SMTP_PUBLIC"))
+ RoomFlags.flags2 = RoomFlags.flags2 | QR2_SMTP_PUBLIC;
+ else
+ RoomFlags.flags2 = RoomFlags.flags2 & ~QR2_SMTP_PUBLIC;
+
+ if (yesbstr("QR2_Moderated"))
+ RoomFlags.flags2 = RoomFlags.flags2 | QR2_MODERATED;
+ else
+ RoomFlags.flags2 = RoomFlags.flags2 & ~QR2_MODERATED;
+ if (yesbstr("QR2_SubsOnly"))
+ RoomFlags.flags2 = RoomFlags.flags2 | QR2_SMTP_PUBLIC;
+ else
+ RoomFlags.flags2 = RoomFlags.flags2 & ~QR2_SMTP_PUBLIC;
- newval = atoi(bstr("newval"));
- self_service(newval);
+ set_roomflags (&RoomFlags);
+
display_editroom();
}
-/**
- * \brief save new parameters for a room
+/*
+ * save new parameters for a room
*/
void editroom(void)
{
@@ -1756,7 +2091,7 @@ void editroom(void)
int bump;
- if (strlen(bstr("ok_button")) == 0) {
+ if (!havebstr("ok_button")) {
strcpy(WC->ImportantMessage,
_("Cancelled. Changes were not saved."));
display_editroom();
@@ -1779,7 +2114,7 @@ void editroom(void)
er_flags2 = extract_int(&buf[4], 7);
strcpy(er_roomaide, bstr("er_roomaide"));
- if (strlen(er_roomaide) == 0) {
+ if (IsEmptyStr(er_roomaide)) {
serv_puts("GETA");
serv_getln(buf, sizeof buf);
if (buf[0] != '2') {
@@ -1790,18 +2125,18 @@ void editroom(void)
}
strcpy(buf, bstr("er_name"));
buf[128] = 0;
- if (strlen(buf) > 0) {
+ if (!IsEmptyStr(buf)) {
strcpy(er_name, buf);
}
strcpy(buf, bstr("er_password"));
buf[10] = 0;
- if (strlen(buf) > 0)
+ if (!IsEmptyStr(buf))
strcpy(er_password, buf);
strcpy(buf, bstr("er_dirname"));
buf[15] = 0;
- if (strlen(buf) > 0)
+ if (!IsEmptyStr(buf))
strcpy(er_dirname, buf);
strcpy(buf, bstr("type"));
@@ -1816,61 +2151,68 @@ void editroom(void)
if (!strcmp(buf, "passworded")) {
er_flags |= (QR_PRIVATE | QR_PASSWORDED);
}
- if (!strcmp(bstr("prefonly"), "yes")) {
+ if (!strcmp(buf, "personal")) {
+ er_flags |= QR_MAILBOX;
+ } else {
+ er_flags &= ~QR_MAILBOX;
+ }
+
+ if (yesbstr("prefonly")) {
er_flags |= QR_PREFONLY;
} else {
er_flags &= ~QR_PREFONLY;
}
- if (!strcmp(bstr("readonly"), "yes")) {
+ if (yesbstr("readonly")) {
er_flags |= QR_READONLY;
} else {
er_flags &= ~QR_READONLY;
}
- if (!strcmp(bstr("collabdel"), "yes")) {
+
+ if (yesbstr("collabdel")) {
er_flags2 |= QR2_COLLABDEL;
} else {
er_flags2 &= ~QR2_COLLABDEL;
}
- if (!strcmp(bstr("permanent"), "yes")) {
+ if (yesbstr("permanent")) {
er_flags |= QR_PERMANENT;
} else {
er_flags &= ~QR_PERMANENT;
}
- if (!strcmp(bstr("subjectreq"), "yes")) {
+ if (yesbstr("subjectreq")) {
er_flags2 |= QR2_SUBJECTREQ;
} else {
er_flags2 &= ~QR2_SUBJECTREQ;
}
- if (!strcmp(bstr("network"), "yes")) {
+ if (yesbstr("network")) {
er_flags |= QR_NETWORK;
} else {
er_flags &= ~QR_NETWORK;
}
- if (!strcmp(bstr("directory"), "yes")) {
+ if (yesbstr("directory")) {
er_flags |= QR_DIRECTORY;
} else {
er_flags &= ~QR_DIRECTORY;
}
- if (!strcmp(bstr("ulallowed"), "yes")) {
+ if (yesbstr("ulallowed")) {
er_flags |= QR_UPLOAD;
} else {
er_flags &= ~QR_UPLOAD;
}
- if (!strcmp(bstr("dlallowed"), "yes")) {
+ if (yesbstr("dlallowed")) {
er_flags |= QR_DOWNLOAD;
} else {
er_flags &= ~QR_DOWNLOAD;
}
- if (!strcmp(bstr("visdir"), "yes")) {
+ if (yesbstr("visdir")) {
er_flags |= QR_VISDIR;
} else {
er_flags &= ~QR_VISDIR;
@@ -1888,7 +2230,7 @@ void editroom(void)
if (!strcmp(bstr("bump"), "yes"))
bump = 1;
- er_floor = atoi(bstr("er_floor"));
+ er_floor = ibstr("er_floor");
sprintf(buf, "SETR %s|%s|%s|%u|%d|%d|%d|%d|%u",
er_name, er_password, er_dirname, er_flags, bump, er_floor,
@@ -1902,7 +2244,7 @@ void editroom(void)
}
gotoroom(er_name);
- if (strlen(er_roomaide) > 0) {
+ if (!IsEmptyStr(er_roomaide)) {
sprintf(buf, "SETA %s", er_roomaide);
serv_puts(buf);
serv_getln(buf, sizeof buf);
@@ -1919,8 +2261,8 @@ void editroom(void)
}
-/**
- * \brief Display form for Invite, Kick, and show Who Knows a room
+/*
+ * Display form for Invite, Kick, and show Who Knows a room
*/
void do_invt_kick(void) {
char buf[SIZ], room[SIZ], username[SIZ];
@@ -1936,7 +2278,7 @@ void do_invt_kick(void) {
strcpy(username, bstr("username"));
- if (strlen(bstr("kick_button")) > 0) {
+ if (havebstr("kick_button")) {
sprintf(buf, "KICK %s", username);
serv_puts(buf);
serv_getln(buf, sizeof buf);
@@ -1950,7 +2292,7 @@ void do_invt_kick(void) {
}
}
- if (strlen(bstr("invite_button")) > 0) {
+ if (havebstr("invite_button")) {
sprintf(buf, "INVT %s", username);
serv_puts(buf);
serv_getln(buf, sizeof buf);
@@ -1969,8 +2311,8 @@ void do_invt_kick(void) {
-/**
- * \brief Display form for Invite, Kick, and show Who Knows a room
+/*
+ * Display form for Invite, Kick, and show Who Knows a room
*/
void display_whok(void)
{
@@ -1986,16 +2328,16 @@ void display_whok(void)
extract_token(room, &buf[4], 0, '|', sizeof room);
- wprintf("
");
+ wprintf("
");
wprintf(_("The users listed below have access to this room. "
"To remove a user from the access list, select the user "
"name from the list and click 'Kick'."));
wprintf("
\n", _("Invite"));
+ /* Pop open an address book -- begin **/
+ wprintf(
+ ""
+ ""
+ " %s",
+ _("User"),
+ _("Users"), _("Users")
+ );
+ /* Pop open an address book -- end **/
- wprintf("
\n");
+ wprintf("
\n");
+ address_book_popup();
wDumpContent(1);
}
-/**
- * \brief display the form for entering a new room
+/*
+ * display the form for entering a new room
*/
void display_entroom(void)
{
@@ -2049,48 +2402,47 @@ void display_entroom(void)
return;
}
- output_headers(1, 1, 2, 0, 0, 0);
- wprintf("
\n"
- "
"
- "");
- wprintf(_("Create a new room"));
- wprintf(""
- "
");
wprintf(_("Name of room: "));
- wprintf("\n");
+ wprintf("
");
+ wprintf("\n");
+ wprintf("
");
- wprintf("
");
+ wprintf("
");
wprintf(_("Resides on floor: "));
+ wprintf("
");
load_floorlist();
- wprintf("\n");
+ wprintf("\n");
for (i = 0; i < 128; ++i)
- if (strlen(floorlist[i]) > 0) {
- wprintf("\n");
+ wprintf("\n");
}
- wprintf("\n");
+ wprintf("\n");
+ wprintf("
");
- /**
+ /*
* Our clever little snippet of JavaScript automatically selects
* a public room if the view is set to Bulletin Board or wiki, and
* it selects a mailbox room otherwise. The user can override this,
* of course. We also disable the floor selector for mailboxes.
*/
- wprintf("
");
- wprintf(_("Default view for room: "));
- wprintf("
\n");
+ svprintf(HKEY("BOXTITLE"), WCS_STRING, _("Go to a hidden room"));
+ do_template("beginbox", NULL);
- wprintf("
\n");
- wprintf(" ");
+ wprintf("
");
wprintf(_("If you know the name of a hidden (guess-name) or "
"passworded room, you can enter that room by typing "
"its name below. Once you gain access to a private "
"room, it will appear in your regular room listings "
"so you don't have to keep returning here."));
- wprintf("\n
");
wprintf(_("Zap (forget/unsubscribe) the current room"));
- wprintf("
\n");
- wprintf("
\n");
- wprintf("
\n
\n");
+ wprintf("\n");
+ wprintf("
\n");
+
+ wprintf("
\n");
wprintf(_("If you select this option, %s will "
"disappear from your room list. Is this what you wish "
"to do? \n"), WC->wc_roomname);
- wprintf("