[Phpfreechat-svn] SF.net SVN: phpfreechat: [549] trunk/src/proxys
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-06-07 20:11:13
|
Revision: 549 Author: kerphi Date: 2006-06-05 07:33:24 -0700 (Mon, 05 Jun 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=549&view=rev Log Message: ----------- Bug fix: disallow to change nickname if frozen_nick is true Modified Paths: -------------- trunk/i18n/en_US/main.php trunk/i18n/fr_FR/main.php trunk/src/proxys/auth.class.php trunk/themes/default/templates/pfcclient.js.tpl.php Modified: trunk/i18n/en_US/main.php =================================================================== --- trunk/i18n/en_US/main.php 2006-06-05 14:11:32 UTC (rev 548) +++ trunk/i18n/en_US/main.php 2006-06-05 14:33:24 UTC (rev 549) @@ -230,4 +230,8 @@ // line 67 in auth.class.php $GLOBALS["i18n"]["Can't join %s because you are banished"] = "Can't join %s because you are banished"; + +// line 79 in auth.class.php +$GLOBALS["i18n"]["You are not allowed to change your nickname"] = "You are not allowed to change your nickname"; + ?> \ No newline at end of file Modified: trunk/i18n/fr_FR/main.php =================================================================== --- trunk/i18n/fr_FR/main.php 2006-06-05 14:11:32 UTC (rev 548) +++ trunk/i18n/fr_FR/main.php 2006-06-05 14:33:24 UTC (rev 549) @@ -230,4 +230,8 @@ // line 67 in auth.class.php $GLOBALS["i18n"]["Can't join %s because you are banished"] = "Vous ne pouvez pas rejoindre %s car vous êtes bannis"; + +// line 79 in auth.class.php +$GLOBALS["i18n"]["You are not allowed to change your nickname"] = "Vous n'êtes pas autorisé à changer votre pseudonyme"; + ?> \ No newline at end of file Modified: trunk/src/proxys/auth.class.php =================================================================== --- trunk/src/proxys/auth.class.php 2006-06-05 14:11:32 UTC (rev 548) +++ trunk/src/proxys/auth.class.php 2006-06-05 14:33:24 UTC (rev 549) @@ -69,6 +69,18 @@ return; } } + + // disallow to change nickname if frozen_nick is true + if ($this->name == "nick") + { + if ($param != $c->nick && + $c->frozen_nick == true) + { + $msg = _pfc("You are not allowed to change your nickname", $param); + $xml_reponse->addScript("pfc.handleResponse('".$this->proxyname."', 'nick', '".addslashes($msg)."');"); + return; + } + } // forward the command to the next proxy or to the final command $this->next->run(&$xml_reponse, $clientid, $param, $sender, $recipient, $recipientid); Modified: trunk/themes/default/templates/pfcclient.js.tpl.php =================================================================== --- trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-05 14:11:32 UTC (rev 548) +++ trunk/themes/default/templates/pfcclient.js.tpl.php 2006-06-05 14:33:24 UTC (rev 549) @@ -386,6 +386,10 @@ { alert(param); } + else if (resp == "nick") + { + this.displayMsg( cmd, param ); + } } else if (cmd == "debug") { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |