* Any URL may now contain a parameter called 'gotofirst' which specifies a room in...
authorArt Cancro <ajc@citadel.org>
Wed, 7 Jan 2009 16:15:12 +0000 (16:15 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 7 Jan 2009 16:15:12 +0000 (16:15 +0000)
webcit/webcit.c

index 14c95628a47ac74c807a351b8c2285d4631a9c04..17901935f7752b8c0e7066422af0ccfc71e6f03c 100644 (file)
@@ -929,6 +929,15 @@ void session_loop(HashList *HTTPHeaders, StrBuf *ReqLine, StrBuf *request_method
                        }
                }
        }
+
+       /*
+        * If a 'gotofirst' parameter has been specified, attempt to goto that room
+        * prior to doing anything else.
+        */
+       if (havebstr("gotofirst")) {
+               smart_goto(bstr("gotofirst"));
+       }
+
        /*
         * If we don't have a current room, but a cookie specifying the
         * current room is supplied, make an effort to go there.