]> code.citadel.org Git - citadel.git/blobdiff - citadel/textclient/citadel.c
* Modified the text client so that the <E>nter message command does not work in room...
[citadel.git] / citadel / textclient / citadel.c
index 7e5ef874a2351bf2233c80e1a4b657bdce81c01f..ba6d6103fa736f66cac48af8fca26943ba7c39ed 100644 (file)
@@ -92,6 +92,7 @@ int screenwidth;
 int screenheight;
 unsigned room_flags;
 unsigned room_flags2;
+int entmsg_ok = 0;
 char room_name[ROOMNAMELEN];
 char *uglist[UGLISTLEN]; /* size of the ungoto list */
 long uglistlsn[UGLISTLEN]; /* current read position for all the ungoto's. Not going to make any friends with this one. */
@@ -470,6 +471,19 @@ void dotgoto(CtdlIPC *ipc, char *towhere, int display_name, int fromungoto)
        from_floor = curr_floor;
        curr_floor = room->RRfloor;
 
+       /* Determine, based on the room's default view, whether an <E>nter message
+        * command will be valid here.
+        */
+       switch(room->RRdefaultview) {
+               case VIEW_BBS:
+               case VIEW_MAILBOX:
+                                       entmsg_ok = 1;
+                                       break;
+               default:
+                                       entmsg_ok = 0;
+                                       break;
+       }
+
        remove_march(room_name, 0);
        if (!strcasecmp(towhere, "_BASEROOM_"))
                remove_march(towhere, 0);