[Phpfreechat-svn] SF.net SVN: phpfreechat: [848] trunk/src/commands
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-10-29 10:36:32
|
Revision: 848 http://svn.sourceforge.net/phpfreechat/?rev=848&view=rev Author: kerphi Date: 2006-10-29 02:36:26 -0800 (Sun, 29 Oct 2006) Log Message: ----------- code cleaning Modified Paths: -------------- trunk/src/commands/connect.class.php trunk/src/commands/join.class.php trunk/src/commands/privmsg.class.php Modified: trunk/src/commands/connect.class.php =================================================================== --- trunk/src/commands/connect.class.php 2006-10-29 10:33:50 UTC (rev 847) +++ trunk/src/commands/connect.class.php 2006-10-29 10:36:26 UTC (rev 848) @@ -81,15 +81,7 @@ // store the customized nick metadata foreach($c->nickmeta as $k => $v) $ct->setUserMeta($nickid, $k, $v); - - // register the user (and his metadata) in the allready joined channel - foreach( $u->channels as $id => $chan ) - $ct->createNick($chan["recipient"], $u->nick, $u->nickid); - foreach( $u->privmsg as $id => $pv ) - $ct->createNick($pv["recipient"], $u->nick, $u->nickid); - $this->forceWhoisReload($u->nick); - // connect to the server $xml_reponse->addScript("pfc.handleResponse('connect', 'ok', '');"); } Modified: trunk/src/commands/join.class.php =================================================================== --- trunk/src/commands/join.class.php 2006-10-29 10:33:50 UTC (rev 847) +++ trunk/src/commands/join.class.php 2006-10-29 10:36:26 UTC (rev 848) @@ -52,11 +52,12 @@ $cmdp["flag"] = 2; $cmd =& pfcCommand::Factory("notice"); $cmd->run($xml_reponse, $cmdp); + } - // register the user (and his metadata) in the channel - $ct =& $c->getContainerInstance(); - $ct->createNick($chanrecip, $u->nick, $u->nickid); - } + // register the user (and his metadata) in the channel + $ct =& $c->getContainerInstance(); + $ct->createNick($chanrecip, $u->nick, $u->nickid); + $this->forceWhoisReload($u->nick); // return ok to the client // then the client will create a new tab Modified: trunk/src/commands/privmsg.class.php =================================================================== --- trunk/src/commands/privmsg.class.php 2006-10-29 10:33:50 UTC (rev 847) +++ trunk/src/commands/privmsg.class.php 2006-10-29 10:36:26 UTC (rev 848) @@ -80,12 +80,13 @@ $from_id_sid = "pfc_from_id_".$c->getId()."_".$clientid."_".$pvrecipientid; $from_id = $container->getLastId($pvrecipient)-$c->max_msg-1; $_SESSION[$from_id_sid] = ($from_id<0) ? 0 : $from_id; - - // register the user (and his metadata) in this pv - $ct =& $c->getContainerInstance(); - $ct->createNick($pvrecipient, $u->nick, $u->nickid); } + // register the user (and his metadata) in this pv + $ct =& $c->getContainerInstance(); + $ct->createNick($pvrecipient, $u->nick, $u->nickid); + $this->forceWhoisReload($u->nick); + // return ok to the client // then the client will create a new tab $xml_reponse->addScript("pfc.handleResponse('".$this->name."', 'ok', Array('".$pvrecipientid."','".addslashes($pvname)."'));"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |