* Added an initial version of the goto command
[citadel.git] / ctdlphp / ctdlsession.php
index a890e842149692bebc7d170fa755cdd9bdb9ee88..b8f2dbcd14215fce35960876abf60fd69044670c 100644 (file)
@@ -42,7 +42,7 @@ function establish_citadel_session() {
                // Ok, now try again.
                $clientsocket = fsockopen($sockname, 0, $errno, $errstr, 5);
 
-               // Try to log the user back in.
+               // Try to log the user back in and go back to the correct room.
                if ($clientsocket) {
 
                        ctdl_iden();    // Identify client
@@ -53,6 +53,13 @@ function establish_citadel_session() {
                                        $_SESSION["password"]
                                );
                        }
+
+                       if ($_SESSION["room"]) {
+                               ctdl_goto($_SESSION["room"]);
+                       }
+                       else {
+                               ctdl_goto("_BASEROOM_");
+                       }
                }
        }