Thread: [Phpfreechat-svn] SF.net SVN: phpfreechat: [532] trunk/src/pfccommand.class.php
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2006-05-28 18:55:50
|
Revision: 532 Author: kerphi Date: 2006-05-28 11:55:40 -0700 (Sun, 28 May 2006) ViewCVS: http://svn.sourceforge.net/phpfreechat/?rev=532&view=rev Log Message: ----------- add a todo comment Modified Paths: -------------- trunk/src/pfccommand.class.php Modified: trunk/src/pfccommand.class.php =================================================================== --- trunk/src/pfccommand.class.php 2006-05-28 18:54:30 UTC (rev 531) +++ trunk/src/pfccommand.class.php 2006-05-28 18:55:40 UTC (rev 532) @@ -77,6 +77,7 @@ $cmd->name = $cmd_name; // instanciate the proxy chains + // @todo instanciate the whole chain (from the 'proxys' parameter array) $proxy = NULL; $proxy_name = strtolower($c->proxys[0]); $proxy_classname = "pfcProxyCommand_" . $proxy_name; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-10-04 09:23:40
|
Revision: 816 http://svn.sourceforge.net/phpfreechat/?rev=816&view=rev Author: kerphi Date: 2006-10-04 02:23:21 -0700 (Wed, 04 Oct 2006) Log Message: ----------- [en] Bug fix : the user's metadata was not correctly updated when it was changed dynamicaly. [15min] [fr] Bug fix : les m?\195?\169ta donn?\195?\169es utilisateur n'?\195?\169taient pas correctement mise ?\195?\160 jour lorsqu'elle ?\195?\169taient chang?\195?\169es dynamiquement. [15min] Modified Paths: -------------- trunk/src/pfccommand.class.php Modified: trunk/src/pfccommand.class.php =================================================================== --- trunk/src/pfccommand.class.php 2006-10-03 19:19:22 UTC (rev 815) +++ trunk/src/pfccommand.class.php 2006-10-04 09:23:21 UTC (rev 816) @@ -150,7 +150,7 @@ $otherids = array(); foreach($channels as $chan) { - $ret = $ct->getOnlineNick($chan); + $ret = $ct->getOnlineNick($ct->decode($chan)); $otherids = array_merge($otherids, $ret['nickid']); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2006-11-21 18:13:14
|
Revision: 876 http://svn.sourceforge.net/phpfreechat/?rev=876&view=rev Author: kerphi Date: 2006-11-21 10:12:57 -0800 (Tue, 21 Nov 2006) Log Message: ----------- [en] Bug fix: on some servers (ex: free.fr), the file_exists php function throw a warning which break pfc [15min] [fr] Bug fix : sur certains serveurs (ex: free.fr), la fonction php file_exists produit un warning qui rend inutilisable pfc [15min] Modified Paths: -------------- trunk/src/pfccommand.class.php Modified: trunk/src/pfccommand.class.php =================================================================== --- trunk/src/pfccommand.class.php 2006-11-15 07:40:50 UTC (rev 875) +++ trunk/src/pfccommand.class.php 2006-11-21 18:12:57 UTC (rev 876) @@ -75,7 +75,7 @@ foreach($cmd_paths as $cp) { $cmd_filename = $cp."/".$cmd_name.".class.php"; - if (file_exists($cmd_filename)) require_once($cmd_filename); + if (@file_exists($cmd_filename)) require_once($cmd_filename); } } if (class_exists($cmd_classname)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-01-04 17:18:14
|
Revision: 912 http://svn.sourceforge.net/phpfreechat/?rev=912&view=rev Author: kerphi Date: 2007-01-04 09:18:13 -0800 (Thu, 04 Jan 2007) Log Message: ----------- [en] Bug fix: on php4 servers, private messages / kick / ban was broken ( see http://sourceforge.net/tracker/index.php?func=detail&aid=1625155&group_id=158880&atid=809603 ) [fr] Bug fix : en php4 les messages priv?\195?\169s / kick / ban ne fonctionnaient plus ( cf http://sourceforge.net/tracker/index.php?func=detail&aid=1625155&group_id=158880&atid=809603 ) Modified Paths: -------------- trunk/src/pfccommand.class.php Modified: trunk/src/pfccommand.class.php =================================================================== --- trunk/src/pfccommand.class.php 2006-12-29 12:22:57 UTC (rev 911) +++ trunk/src/pfccommand.class.php 2007-01-04 17:18:13 UTC (rev 912) @@ -205,7 +205,7 @@ return false; } - function RunPendingCmdToPlay($nickid,$clientid,$xml_reponse) + function RunPendingCmdToPlay($nickid,$clientid,&$xml_reponse) { $c =& pfcGlobalConfig::Instance(); $u =& pfcUserConfig::Instance(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-03-25 16:55:12
|
Revision: 1008 http://svn.sourceforge.net/phpfreechat/?rev=1008&view=rev Author: kerphi Date: 2007-03-25 09:55:12 -0700 (Sun, 25 Mar 2007) Log Message: ----------- code cleaning Modified Paths: -------------- trunk/src/pfccommand.class.php Modified: trunk/src/pfccommand.class.php =================================================================== --- trunk/src/pfccommand.class.php 2007-03-25 15:58:22 UTC (rev 1007) +++ trunk/src/pfccommand.class.php 2007-03-25 16:55:12 UTC (rev 1008) @@ -301,13 +301,41 @@ $params = array_values($params); $params = array_map("trim",$params); $params = array_merge(array($clientid,$recipientid), $params); + + $result['cmdstr'] = $cmd_str; + $result['cmdname'] = $cmd; + $result['params'] = $params; + } + return $result; + } + + /* + // THIS IS ANOTHER WAY TO PARSE THE PARAMETERS + // IT'S NOT SIMPLIER BUT MAYBE FASTER + // @todo : take the faster methode + function ParseCommand($cmd_str, $one_parameter = false) + { + $pattern_command = '/^\/([a-z0-9]+)\s*([a-z0-9]+)\s*([a-z0-9]+)\s*(.*)/'; + $result = array(); + + // parse the command name (ex: '/invite') + if (preg_match($pattern_command, $cmd_str, $res)) + { + $cmd = $res[1]; + $clientid = $res[2]; + $recipientid = $res[3]; + $params_str = $res[4]; + // don't parse multiple parameters for special commands with only one parameter + // this make possible to send double quotes (") in these commands + if ($one_parameter || $cmd == 'send' || $cmd == 'notice' || $cmd == 'me') + { + $result['cmdstr'] = $cmd_str; + $result['cmdname'] = $cmd; + $result['params'] = array($clientid, $recipientid, $params_str); + return $result; + } - // THIS IS ANOTHER WAY TO PARSE THE PARAMETERS - // IT'S NOT SIMPLIER BUT MAYBE FASTER - // @todo : take the faster methode - /* - $params = array($clientid, $recipientid); $sep = preg_match('/[^\\\\]"/',$params_str) ? '"' : ' '; if ($sep == ' ') $params_str = ' ' . $params_str; @@ -345,8 +373,6 @@ // append the tail if ($offset < strlen($params_str)) $params[] = substr($params_str,$offset); - */ - $result['cmdstr'] = $cmd_str; $result['cmdname'] = $cmd; @@ -354,6 +380,8 @@ } return $result; } +*/ + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ke...@us...> - 2007-06-23 12:39:13
|
Revision: 1036 http://svn.sourceforge.net/phpfreechat/?rev=1036&view=rev Author: kerphi Date: 2007-06-23 05:36:56 -0700 (Sat, 23 Jun 2007) Log Message: ----------- Bug fix: sometime pfcCommand::Factory was returning NULL reference (thanks to Antinoo) Modified Paths: -------------- trunk/src/pfccommand.class.php Modified: trunk/src/pfccommand.class.php =================================================================== --- trunk/src/pfccommand.class.php 2007-06-11 16:31:36 UTC (rev 1035) +++ trunk/src/pfccommand.class.php 2007-06-23 12:36:56 UTC (rev 1036) @@ -65,8 +65,7 @@ $cmd_filename = $c->cmd_path.'/'.$cmd_name.'.class.php'; if (file_exists($cmd_filename)) require_once($cmd_filename); - if (!class_exists($cmd_classname)) - return NULL; + if (!class_exists($cmd_classname)) { $tmp = NULL; return $tmp; } $cmd =& new $cmd_classname; $cmd->name = $cmd_name; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <gpi...@us...> - 2007-08-06 19:55:20
|
Revision: 1091 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1091&view=rev Author: gpinzone Date: 2007-08-06 12:55:21 -0700 (Mon, 06 Aug 2007) Log Message: ----------- Simplified RunPendingCmdToPlay Modified Paths: -------------- trunk/src/pfccommand.class.php Modified: trunk/src/pfccommand.class.php =================================================================== --- trunk/src/pfccommand.class.php 2007-08-06 15:19:59 UTC (rev 1090) +++ trunk/src/pfccommand.class.php 2007-08-06 19:55:21 UTC (rev 1091) @@ -206,7 +206,7 @@ // take a command from the list $cmdtoplay = $ct->getUserMeta($nickid, 'cmdtoplay'); $cmdtoplay = ($cmdtoplay == NULL) ? array() : unserialize($cmdtoplay); - if (count($cmdtoplay) == 0) { $morecmd = false; continue; } + if (count($cmdtoplay) == 0) { $morecmd = false; break; } // take the last posted command $cmdtmp = array_pop($cmdtoplay); // store the new cmdtoplay list (-1 item) @@ -226,12 +226,6 @@ $cmd->run($xml_reponse, $cmdp); else @$cmd->run($xml_reponse, $cmdp); - - // check if there is other command to play - $cmdtoplay = $ct->getUserMeta($nickid, 'cmdtoplay'); - $cmdtoplay = ($cmdtoplay == NULL) ? array() : unserialize($cmdtoplay); - - $morecmd = (count($cmdtoplay) > 0); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |