- if (strcasecmp(roomname, WC->roomname)) {
- /* can't find the room */
- convenience_page(char *titlebarcolor, char *titlebarmsg, char *messagetext);
+ /* If we're still not in the correct room, it doesn't exist. */
+ if (strcasecmp(roomname, WC->wc_roomname)) {
+ snprintf(errmsg, sizeof errmsg,
+ _("There is no room called '%s'."),
+ roomname);
+ convenience_page("FF0000", _("Error"), errmsg);
+ return;
+ }
+
+ if (WC->wc_view != VIEW_WIKI) {
+ snprintf(errmsg, sizeof errmsg,
+ _("'%s' is not a Wiki room."),
+ roomname);
+ convenience_page("FF0000", _("Error"), errmsg);
+ return;
+ }
+
+ if (strlen(pagename) == 0) {
+ strcpy(pagename, "home");
+ }
+
+ /* Found it! Now read it. */
+ msgnum = locate_message_by_uid(pagename);
+ if (msgnum >= 0L) {
+ output_headers(1, 1, 1, 0, 0, 0);
+ read_message(msgnum, 0, "");
+ wDumpContent(1);
+ return;