From: Art Cancro Date: Sun, 2 Nov 2003 06:04:27 +0000 (+0000) Subject: * Identify ourselves to Citadel using IDEN X-Git-Tag: v7.86~5717 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=53dfe6066aac4c141539528e6d268ae804323bde * Identify ourselves to Citadel using IDEN --- diff --git a/ctdlphp/ctdlprotocol.php b/ctdlphp/ctdlprotocol.php index 32d003045..e197952cd 100644 --- a/ctdlphp/ctdlprotocol.php +++ b/ctdlphp/ctdlprotocol.php @@ -30,6 +30,20 @@ function serv_puts($buf) { fwrite($clientsocket, $buf . "\n", (strlen($buf)+1) ); } + + +// +// Identify this client, and the hostname where the user is, to Citadel. +// +function ctdl_iden() { + global $clientsocket; + + serv_puts("IDEN 0|8|001|PHP web client|" . $_SERVER['REMOTE_ADDR'] ); + $buf = serv_gets(); +} + + + // // login_existing_user() -- attempt to login using a supplied username/password // Returns an array with two variables: diff --git a/ctdlphp/ctdlsession.php b/ctdlphp/ctdlsession.php index 81e7c2829..a890e8421 100644 --- a/ctdlphp/ctdlsession.php +++ b/ctdlphp/ctdlsession.php @@ -45,6 +45,7 @@ function establish_citadel_session() { // Try to log the user back in. if ($clientsocket) { + ctdl_iden(); // Identify client if ($_SESSION["username"]) { login_existing_user( diff --git a/ctdlphp/sessionproxy.php b/ctdlphp/sessionproxy.php index a9e627e87..9f56d18b5 100755 --- a/ctdlphp/sessionproxy.php +++ b/ctdlphp/sessionproxy.php @@ -84,7 +84,7 @@ chmod($sockname, 0600); // We need to get a connection to the Citadel server going now. $ctdlsock = fsockopen("uncensored.citadel.org", 504, $errno, $errstr, 30); -// $ctdlsock = fsockopen("/appl/citadel/citadel.socket", 0, $errno, $errstr, 30); +//$ctdlsock = fsockopen("/appl/citadel/citadel.socket", 0, $errno, $errstr, 30); if (!$ctdlsock) { socket_close ($sock); system("/bin/rm -f " . $sockname); diff --git a/ctdlphp/who.php b/ctdlphp/who.php index d1f78366e..019354a33 100644 --- a/ctdlphp/who.php +++ b/ctdlphp/who.php @@ -2,7 +2,6 @@ include "ctdlheader.php"; bbs_page_header(); - echo ""; echo ""; echo "";
User