[Phpfreechat-svn] SF.net SVN: phpfreechat: [587] trunk/src
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-06-15 12:42:05
|
Revision: 587 Author: kerphi Date: 2006-06-15 05:32:11 -0700 (Thu, 15 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=587&view=rev Log Message: ----------- Simply and optimize the code (about nickid) Modified Paths: -------------- trunk/src/commands/privmsg.class.php trunk/src/phpfreechat.class.php trunk/src/proxys/auth.class.php trunk/src/proxys/noflood.class.php Modified: trunk/src/commands/privmsg.class.php =================================================================== --- trunk/src/commands/privmsg.class.php 2006-06-15 12:23:54 UTC (rev 586) +++ trunk/src/commands/privmsg.class.php 2006-06-15 12:32:11 UTC (rev 587) @@ -14,7 +14,7 @@ // check the pvname exists on the server $container =& $c->getContainerInstance(); $pvnickid = $container->getNickId($pvname); - $nickid = $container->getNickId($u->nick); + $nickid = $u->nickid; // error: can't speak to myself if ($pvnickid == $nickid) Modified: trunk/src/phpfreechat.class.php =================================================================== --- trunk/src/phpfreechat.class.php 2006-06-15 12:23:54 UTC (rev 586) +++ trunk/src/phpfreechat.class.php 2006-06-15 12:32:11 UTC (rev 587) @@ -360,7 +360,7 @@ // before playing the wanted command // play the found commands into the meta 'cmdtoplay' $container =& $c->getContainerInstance(); - $nickid = $container->getNickId($u->nick); + $nickid = $u->nickid; $morecmd = true; while($morecmd) { Modified: trunk/src/proxys/auth.class.php =================================================================== --- trunk/src/proxys/auth.class.php 2006-06-15 12:23:54 UTC (rev 586) +++ trunk/src/proxys/auth.class.php 2006-06-15 12:32:11 UTC (rev 587) @@ -40,15 +40,15 @@ if ( in_array($this->name, $admincmd) ) { $container =& $c->getContainerInstance(); - $nickid = $container->getNickId($sender); + $nickid = $u->nickid; $isadmin = $container->getMeta("isadmin", "nickname", $nickid); if (!$isadmin) { $xml_reponse->addScript("alert('".addslashes(_pfc("You are not allowed to run '%s' command", $this->name))."');"); return; } - } - + } + // channels protection if ($this->name == "join") { @@ -59,7 +59,7 @@ $chanid = pfcCommand_join::GetRecipientId($channame); $banlist = $container->getMeta("banlist_nickid", "channel", $chanid); if ($banlist == NULL) $banlist = array(); else $banlist = unserialize($banlist); - $nickid = $container->getNickId($u->nick); + $nickid = $u->nickid; if (in_array($nickid,$banlist)) { // the user is banished, show a message and don't forward the /join command Modified: trunk/src/proxys/noflood.class.php =================================================================== --- trunk/src/proxys/noflood.class.php 2006-06-15 12:23:54 UTC (rev 586) +++ trunk/src/proxys/noflood.class.php 2006-06-15 12:32:11 UTC (rev 587) @@ -39,7 +39,7 @@ if ( in_array($this->name, $cmdtocheck) ) { $container =& $c->getContainerInstance(); - $nickid = $container->getNickId($sender); + $nickid = $u->nickid; $isadmin = $container->getMeta("isadmin", "nickname", $nickid); $lastfloodtime = $container->getMeta("floodtime", "nickname", $nickid); $nbflood = $container->getMeta("nbflood", "nickname", $nickid); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |