[Phpfreechat-svn] SF.net SVN: phpfreechat: [529] trunk/src
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-05-28 18:36:14
|
Revision: 529 Author: kerphi Date: 2006-05-28 11:36:08 -0700 (Sun, 28 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=529&view=rev Log Message: ----------- remove 'admins' parameter array add 'isadmin' parameter rename 'proxy' to 'proxys' parameter Modified Paths: -------------- trunk/src/commands/connect.class.php trunk/src/pfccommand.class.php trunk/src/pfcglobalconfig.class.php Modified: trunk/src/commands/connect.class.php =================================================================== --- trunk/src/commands/connect.class.php 2006-05-28 17:09:31 UTC (rev 528) +++ trunk/src/commands/connect.class.php 2006-05-28 18:36:08 UTC (rev 529) @@ -20,11 +20,7 @@ // store the user ip $container->setMeta($_SERVER["REMOTE_ADDR"], "ip", "nickname", $nickid); // store the admin flag - if (in_array($c->nick, $c->admins)) - $container->setMeta(true, "isadmin", "nickname", $nickid); - else - $container->setMeta(false, "isadmin", "nickname", $nickid); - + $container->setMeta($c->isadmin, "isadmin", "nickname", $nickid); // connect to the server $xml_reponse->addScript("pfc.handleResponse('connect', 'ok', '');"); Modified: trunk/src/pfccommand.class.php =================================================================== --- trunk/src/pfccommand.class.php 2006-05-28 17:09:31 UTC (rev 528) +++ trunk/src/pfccommand.class.php 2006-05-28 18:36:08 UTC (rev 529) @@ -79,7 +79,7 @@ // instanciate the proxy chains $proxy = NULL; - $proxy_name = strtolower($c->proxy[0]); + $proxy_name = strtolower($c->proxys[0]); $proxy_classname = "pfcProxyCommand_" . $proxy_name; $proxy_filename = dirname(__FILE__)."/proxys/".$proxy_name.".class.php"; if (file_exists($proxy_filename)) require_once($proxy_filename); Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2006-05-28 17:09:31 UTC (rev 528) +++ trunk/src/pfcglobalconfig.class.php 2006-05-28 18:36:08 UTC (rev 529) @@ -31,17 +31,16 @@ class pfcGlobalConfig { var $serverid = ""; // this is the chat server id (comparable to the server host in IRC) - - var $admins = array(); - var $proxy = array("auth"); // these parameters are dynamic (not cached) var $nick = ""; // the initial nickname ("" means the user will be queried) + var $isadmin = false; var $channels = array(); // the default joined channels when opening the chat var $privmsg = array(); // the default privmsg chat to lauch when opening the chat var $active = false; // by default the user is not connected // these parameters are static (cached) + var $proxys = array("auth"); var $title = ""; // default is _pfc("My Chat") var $channel = ""; // default is _pfc("My room") var $frozen_nick = false; @@ -135,8 +134,10 @@ $this->synchronizeWithCache(); - // the nickname is not global, it must not be cached - if (isset($params["nick"])) $this->nick = $params["nick"]; + // the 'nick' is dynamic, it must not be cached + if (isset($params["nick"])) $this->nick = $params["nick"]; + // the 'isadmin' flag is dynamic, it must not be cached + if (isset($params["isadmin"])) $this->isadmin = $params["isadmin"]; } function &Instance( $params = array() ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |