X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=ctdlphp%2Fctdlprotocol.php;h=cebf9f45210a99795eeca50fb6bebb40dae5cb12;hb=1de9808551fd581902b0c3a8bb5a892c5d3272e2;hp=45c136e3de8ff1934efbd138c3938ed03a9575a6;hpb=e6a4b2358565a53c04c90bbeb34f661c5aec98c2;p=citadel.git diff --git a/ctdlphp/ctdlprotocol.php b/ctdlphp/ctdlprotocol.php index 45c136e3d..cebf9f452 100644 --- a/ctdlphp/ctdlprotocol.php +++ b/ctdlphp/ctdlprotocol.php @@ -108,6 +108,7 @@ function create_new_user($user, $pass) { // function become_logged_in($server_parms) { $_SESSION["logged_in"] = 1; + ctdl_goto("_BASEROOM_"); } @@ -209,5 +210,25 @@ function ctdl_rwho() { } +// +// Goto a room. +// +function ctdl_goto($to_where) { + + serv_puts("GOTO " . $to_where); + $response = serv_gets(); + + if (substr($response, 0, 1) == "2") { + $_SESSION["room"] = strtok(substr($response, 4), "|"); + return array(TRUE, substr($response, 0, 3)); + } + + else { + return array(FALSE, substr($response, 0, 3)); + } + +} + + ?>