Logging in as "guest" from the text client now does the Right Thing
authorArt Cancro <ajc@citadel.org>
Tue, 31 Aug 2010 20:07:26 +0000 (16:07 -0400)
committerArt Cancro <ajc@citadel.org>
Tue, 31 Aug 2010 20:07:26 +0000 (16:07 -0400)
depending on whether the server to which it is connected actually
supports guest mode.  This may or may not stay this way.

citadel/textclient/citadel.c

index f44ed079a56599c1b87e88b55ea6f5826b0a08ef..998451f7ba6f02beafcf48e30bb38c762aea61a9 100644 (file)
@@ -1684,9 +1684,12 @@ int main(int argc, char **argv)
                mcmd = 29;
                goto TERMN8;
        }
-       if (!strcasecmp(fullname, "guest")) {           // GUEST MODE
-               goto PWOK;                              // THIS DOES NOT WORK YET
-       }                                               // EXPERIMENT FIXME FIXME FIXME
+
+       /* FIXME this is a stupid way to do guest mode but it's a reasonable test harness FIXME */
+       if ( (ipc->ServInfo.guest_logins) && (!strcasecmp(fullname, "guest")) ) {
+               goto PWOK;
+       }
+
        /* sign on to the server */
        r = CtdlIPCTryLogin(ipc, fullname, aaa);
        if (r / 100 != 3)