[Phpfreechat-svn] SF.net SVN: phpfreechat: [817] trunk/src/commands/quit.class.php
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-10-04 09:28:50
|
Revision: 817 http://svn.sourceforge.net/phpfreechat/?rev=817&view=rev Author: kerphi Date: 2006-10-04 02:28:29 -0700 (Wed, 04 Oct 2006) Log Message: ----------- [en] Bug fix: when user quit a channel and join again this channel, the join message was not shown. [20min] [fr] Bug fix : lorsqu'un utilisateur quittait un salon puis revenait, le message signalant qu'il est revenu n'?\195?\169tait pas affich?\195?\169. [20min] Modified Paths: -------------- trunk/src/commands/quit.class.php Modified: trunk/src/commands/quit.class.php =================================================================== --- trunk/src/commands/quit.class.php 2006-10-04 09:23:21 UTC (rev 816) +++ trunk/src/commands/quit.class.php 2006-10-04 09:28:29 UTC (rev 817) @@ -15,17 +15,13 @@ $c =& $this->c; $u =& $this->u; - // set the chat inactive - $u->active = false; - $u->saveInCache(); - // then remove the nickname file - $container =& $c->getContainerInstance(); + $ct =& $c->getContainerInstance(); $quitmsg = $param == "" ? _pfc("%s quit", $u->nick) : _pfc("%s quit (%s)", $u->nick, $param); // from the channels foreach( $u->channels as $id => $chandetail ) - if ($container->removeNick($chandetail["recipient"], $u->nickid)) + if ($ct->removeNick($chandetail["recipient"], $u->nickid)) { $cmdp = $p; $cmdp["param"] = $id; @@ -36,7 +32,7 @@ } // from the private messages foreach( $u->privmsg as $id => $pvdetail ) - if ($container->removeNick($pvdetail["recipient"], $u->nickid)) + if ($ct->removeNick($pvdetail["recipient"], $u->nickid)) { $cmdp = $p; $cmdp["param"] = $id; @@ -46,8 +42,12 @@ $cmd->run($xml_reponse, $cmdp); } // from the server - $container->removeNick(NULL, $u->nickid); + $ct->removeNick(NULL, $u->nickid); + // then set the chat inactive + $u->active = false; + $u->saveInCache(); + $xml_reponse->addScript("pfc.handleResponse('quit', 'ok', '');"); if ($c->debug) pxlog("/quit (a user just quit -> nick=".$u->nick.")", "chat", $c->getId()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |