[Phpfreechat-svn] SF.net SVN: phpfreechat:[1263] trunk
Status: Beta
Brought to you by:
kerphi
From: <ke...@us...> - 2009-04-26 13:10:18
|
Revision: 1263 http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1263&view=rev Author: kerphi Date: 2009-04-26 13:10:07 +0000 (Sun, 26 Apr 2009) Log Message: ----------- Isolate the kick/ban notices. Setup the flag 4 on the shownotice parameter to display only kick/ban notices. Modified Paths: -------------- trunk/index.php trunk/src/commands/ban.class.php trunk/src/commands/kick.class.php trunk/src/commands/leave.class.php trunk/src/commands/notice.class.php trunk/src/pfcglobalconfig.class.php Modified: trunk/index.php =================================================================== --- trunk/index.php 2009-04-25 11:58:21 UTC (rev 1262) +++ trunk/index.php 2009-04-26 13:10:07 UTC (rev 1263) @@ -5,9 +5,9 @@ $params["title"] = "Quick chat"; $params["nick"] = "guest".rand(1,1000); // setup the intitial nickname $params['firstisadmin'] = true; -//$params["isadmin"] = true; // do not use it on production servers ;) +//$params["isadmin"] = true; // makes everybody admin: do not use it on production servers ;) $params["serverid"] = md5(__FILE__); // calculate a unique id for this chat -$params["debug"] = true; +$params["debug"] = false; $chat = new phpFreeChat( $params ); ?> Modified: trunk/src/commands/ban.class.php =================================================================== --- trunk/src/commands/ban.class.php 2009-04-25 11:58:21 UTC (rev 1262) +++ trunk/src/commands/ban.class.php 2009-04-26 13:10:07 UTC (rev 1263) @@ -46,11 +46,11 @@ // notify all the channel $cmdp = $p; $cmdp["param"] = _pfc("%s banished from %s by %s", $nick, $channame, $sender); - $cmdp["flag"] = 1; + $cmdp["flag"] = 4; $cmd =& pfcCommand::Factory("notice"); $cmd->run($xml_reponse, $cmdp); - // kick the user (maybe in the future, it will be dissociate in a /kickban command) + // kick the user (maybe in the future, it will exists a /kickban command) $cmdp = $p; $cmdp["params"] = array(); $cmdp["params"][] = $nick; // nickname to kick Modified: trunk/src/commands/kick.class.php =================================================================== --- trunk/src/commands/kick.class.php 2009-04-25 11:58:21 UTC (rev 1262) +++ trunk/src/commands/kick.class.php 2009-04-26 13:10:07 UTC (rev 1263) @@ -44,6 +44,7 @@ $channame = $u->channels[$recipientid]["name"]; $cmdstr = 'leave'; $cmdp = array(); + $cmdp['flag'] = 4; $cmdp['params'][] = 'ch'; $cmdp['params'][] = $channame; // channel name $cmdp['params'][] = _pfc("kicked from %s by %s - reason: %s", $channame, $sender, $reason); // reason Modified: trunk/src/commands/leave.class.php =================================================================== --- trunk/src/commands/leave.class.php 2009-04-25 11:58:21 UTC (rev 1262) +++ trunk/src/commands/leave.class.php 2009-04-26 13:10:07 UTC (rev 1263) @@ -14,6 +14,7 @@ $sender = $p["sender"]; $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; + $flag = isset($p["flag"]) ? $p["flag"] : 2; $c =& pfcGlobalConfig::Instance(); $u =& pfcUserConfig::Instance(); @@ -95,7 +96,7 @@ $cmdp = $p; $cmdp["recipient"] = $leave_recip; $cmdp["recipientid"] = $leave_id; - $cmdp["flag"] = 2; + $cmdp["flag"] = $flag; $cmdp["param"] = _pfc("%s quit",$u->getNickname()); if ($reason != "") $cmdp["param"] .= " (".$reason.")"; $cmd =& pfcCommand::Factory("notice"); Modified: trunk/src/commands/notice.class.php =================================================================== --- trunk/src/commands/notice.class.php 2009-04-25 11:58:21 UTC (rev 1262) +++ trunk/src/commands/notice.class.php 2009-04-26 13:10:07 UTC (rev 1263) @@ -11,7 +11,7 @@ $sender = $p["sender"]; $recipient = $p["recipient"]; $recipientid = $p["recipientid"]; - $flag = isset($p["flag"]) ? $p["flag"] : 3; + $flag = isset($p["flag"]) ? $p["flag"] : 7; $c =& pfcGlobalConfig::Instance(); $u =& pfcUserConfig::Instance(); Modified: trunk/src/pfcglobalconfig.class.php =================================================================== --- trunk/src/pfcglobalconfig.class.php 2009-04-25 11:58:21 UTC (rev 1262) +++ trunk/src/pfcglobalconfig.class.php 2009-04-26 13:10:07 UTC (rev 1263) @@ -330,10 +330,11 @@ * <p><ul><li>Setting this to 0 will show nothing.</li> * <li>Setting it to 1 will show nicknames changes.</li> * <li>Setting it to 2 will show connect/disconnect notifications.</li> - * <li>Setting it to 3 (1+2) will show nicknames and connect/disconnect notifications.</li></ul> - * (Default value: 3)</p> + * <li>Setting it to 4 will show kick/ban notifications.</li> + * <li>Setting it to 7 (1+2+4) will show all the notifications.</li></ul> + * (Default value: 7)</p> */ - var $shownotice = 3; + var $shownotice = 7; /** * <p>Setting it to false will disable nickname colorization. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |