Revision: 670
Author: kerphi
Date: 2006-08-02 07:22:00 -0700 (Wed, 02 Aug 2006)
ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=670&view=rev
Log Message:
-----------
Bug fix: the ban command was broken
Modified Paths:
--------------
trunk/src/commands/ban.class.php
Modified: trunk/src/commands/ban.class.php
===================================================================
--- trunk/src/commands/ban.class.php 2006-08-02 14:14:46 UTC (rev 669)
+++ trunk/src/commands/ban.class.php 2006-08-02 14:22:00 UTC (rev 670)
@@ -8,6 +8,12 @@
function run(&$xml_reponse, $p)
{
+ $clientid = $p["clientid"];
+ $param = $p["param"];
+ $sender = $p["sender"];
+ $recipient = $p["recipient"];
+ $recipientid = $p["recipientid"];
+
$c =& $this->c;
$u =& $this->u;
@@ -24,17 +30,17 @@
$container =& $c->getContainerInstance();
- $nickid = $container->getNickId($p["param"]);
+ $nickid = $container->getNickId($param);
if ($nickid != "undefined")
{
$cmdtoplay = $container->getMeta("cmdtoplay", "nickname", $nickid);
$cmdtoplay = ($cmdtoplay == NULL) ? array() : unserialize($cmdtoplay);
$cmdtmp = array("leave", /* cmdname */
- $p["recipientid"],/* param */
- $p["sender"], /* sender */
- $p["recipient"], /* recipient */
- $p["recipientid"],/* recipientid */
+ $recipientid,/* param */
+ $sender, /* sender */
+ $recipient, /* recipient */
+ $recipientid,/* recipientid */
);
//_pfc("banished from %s by %s", $recipient, $sender);
$cmdtoplay[] = $cmdtmp; // ban the user from the current channel
@@ -42,13 +48,13 @@
}
// update the recipient banlist
- $banlist = $container->getMeta("banlist_nickid", "channel", $p["recipientid"]);
+ $banlist = $container->getMeta("banlist_nickid", "channel", $recipientid);
if ($banlist == NULL)
$banlist = array();
else
$banlist = unserialize($banlist);
$banlist[] = $nickid; // append the nickid to the banlist
- $container->setMeta(serialize($banlist), "banlist_nickid", "channel", $p["recipientid"]);
+ $container->setMeta(serialize($banlist), "banlist_nickid", "channel", $recipientid);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|