Revision: 742
http://svn.sourceforge.net/phpfreechat/?rev=742&view=rev
Author: kerphi
Date: 2006-09-08 14:23:04 -0700 (Fri, 08 Sep 2006)
Log Message:
-----------
Bug fix: the nick should not be changed before the connect step or it will block periodic refresh
Modified Paths:
--------------
trunk/src/proxys/checknickchange.class.php
Modified: trunk/src/proxys/checknickchange.class.php
===================================================================
--- trunk/src/proxys/checknickchange.class.php 2006-09-08 20:58:59 UTC (rev 741)
+++ trunk/src/proxys/checknickchange.class.php 2006-09-08 21:23:04 UTC (rev 742)
@@ -37,11 +37,11 @@
$sender = $p["sender"];
$recipient = $p["recipient"];
$recipientid = $p["recipientid"];
-
+ $owner = isset($p["owner"]) ? $p["owner"] : '';
$c =& $this->c;
$u =& $this->u;
- if ( $this->name == "nick")
+ if ( $this->name == 'nick' )
{
$newnick = phpFreeChat::FilterNickname($param);
$oldnick = $u->nick;
@@ -60,7 +60,7 @@
$u->nick != "" &&
$param != $u->nick &&
$c->frozen_nick == true &&
- $p["owner"] != "checknickchange" )
+ $owner != $this->proxyname )
{
$msg = _pfc("You are not allowed to change your nickname");
$xml_reponse->addScript("pfc.handleResponse('".$this->proxyname."', 'nick', '".addslashes($msg)."');");
@@ -103,23 +103,21 @@
}
// allow nick changes only from the parameters array (server side)
- if ($c->frozen_nick == true &&
+ if ($this->name != 'connect' && // don't check anything on the connect process or it could block the periodic refresh
+ $c->frozen_nick == true &&
$u->nick != $c->nick &&
$c->nick != "" && // don't change the nickname to empty or the asknick popup will loop indefinatly
- $p["owner"] != "checknickchange")
+ $owner != $this->proxyname)
{
// change the user nickname
$cmdp = $p;
$cmdp["param"] = $c->nick;
- $cmdp["owner"] = "checknickchange";
+ $cmdp["owner"] = $this->proxyname;
$cmd =& pfcCommand::Factory("nick");
$cmd->run($xml_reponse, $cmdp);
return;
}
-
-
-
// forward the command to the next proxy or to the final command
$this->next->run($xml_reponse, $p);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|