[Phpfreechat-svn] SF.net SVN: phpfreechat: [985] trunk/src
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2007-03-08 13:59:54
|
Revision: 985 http://svn.sourceforge.net/phpfreechat/?rev=985&view=rev Author: kerphi Date: 2007-03-08 05:59:52 -0800 (Thu, 08 Mar 2007) Log Message: ----------- should fix the "You must be connected" problem Modified Paths: -------------- trunk/src/pfccontainer.class.php trunk/src/proxies/checktimeout.class.php Modified: trunk/src/pfccontainer.class.php =================================================================== --- trunk/src/pfccontainer.class.php 2007-03-07 19:14:11 UTC (rev 984) +++ trunk/src/pfccontainer.class.php 2007-03-08 13:59:52 UTC (rev 985) @@ -147,13 +147,15 @@ function removeNick($chan, $nickid) { $c =& pfcGlobalConfig::Instance(); - + if ($chan == NULL) $chan = 'SERVER'; $deleted_user = array(); $deleted_user["nick"] = array(); $deleted_user["nickid"] = array(); $deleted_user["timestamp"] = array(); + + if (!$nickid) return $deleted_user; $timestamp = $this->getMeta("channelid-to-nickid", $this->encode('SERVER'), $nickid); if (count($timestamp["timestamp"]) == 0) return $deleted_user; @@ -162,7 +164,7 @@ $deleted_user["nick"][] = $this->getNickname($nickid); $deleted_user["nickid"][] = $nickid; $deleted_user["timestamp"][] = $timestamp; - + // remove the nickid from the channel list $this->rmMeta('channelid-to-nickid', $this->encode($chan), $nickid); $this->rmMeta('nickid-to-channelid', $nickid, $this->encode($chan)); @@ -284,7 +286,7 @@ { $timestamp = $ret['timestamp'][$i]; $nickid = $ret['value'][$i]; - if (time() > ($timestamp+$timeout/1000) ) // user will be disconnected after 'timeout' secondes of inactivity + if (time() > ($timestamp+$timeout/1000) && $nickid) // user will be disconnected after 'timeout' secondes of inactivity { // get the current user's channels list $channels = array(); @@ -733,4 +735,4 @@ } } -?> \ No newline at end of file +?> Modified: trunk/src/proxies/checktimeout.class.php =================================================================== --- trunk/src/proxies/checktimeout.class.php 2007-03-07 19:14:11 UTC (rev 984) +++ trunk/src/proxies/checktimeout.class.php 2007-03-08 13:59:52 UTC (rev 985) @@ -39,6 +39,8 @@ $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; + if ($this->name == 'update') + { $c =& pfcGlobalConfig::Instance(); $u =& pfcUserConfig::Instance(); $ct =& pfcContainer::Instance(); @@ -50,6 +52,7 @@ $nick = $disconnected_users["nick"][$i]; for($j=0; $j<count($disconnected_users["channels"][$i]); $j++) { + file_put_contents('/tmp/disco',var_export($disconnected_users,true), FILE_APPEND); $chan = $disconnected_users["channels"][$i][$j]; $online_users = $ct->getOnlineNick($chan); if ($chan != 'SERVER' && @@ -65,10 +68,11 @@ } } } + } // forward the command to the next proxy or to the final command $this->next->run($xml_reponse, $p); } } -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |