[Phpfreechat-svn] SF.net SVN: phpfreechat: [1057] trunk/src/commands
Status: Beta
Brought to you by:
kerphi
|
From: <ke...@us...> - 2007-07-27 07:30:58
|
Revision: 1057
http://phpfreechat.svn.sourceforge.net/phpfreechat/?rev=1057&view=rev
Author: kerphi
Date: 2007-07-27 00:30:58 -0700 (Fri, 27 Jul 2007)
Log Message:
-----------
Allow unquotted reason for /kick and /ban commands (thanks to ljbuesch)
http://www.phpfreechat.net/forum/viewtopic.php?id=1699
Modified Paths:
--------------
trunk/src/commands/ban.class.php
trunk/src/commands/kick.class.php
Modified: trunk/src/commands/ban.class.php
===================================================================
--- trunk/src/commands/ban.class.php 2007-07-23 10:21:38 UTC (rev 1056)
+++ trunk/src/commands/ban.class.php 2007-07-27 07:30:58 UTC (rev 1057)
@@ -21,6 +21,12 @@
$nick = isset($params[0]) ? $params[0] : '';
$reason = isset($params[1]) ? $params[1] : '';
if ($reason == '') $reason = _pfc("no reason");
+
+ // to allow unquotted reason
+ if (count($params) > 2)
+ for ($x=2;$x<count($params);$x++)
+ $reason.=" ".$params[$x];
+
$channame = $u->channels[$recipientid]["name"];
if ($nick == '')
Modified: trunk/src/commands/kick.class.php
===================================================================
--- trunk/src/commands/kick.class.php 2007-07-23 10:21:38 UTC (rev 1056)
+++ trunk/src/commands/kick.class.php 2007-07-27 07:30:58 UTC (rev 1057)
@@ -22,6 +22,11 @@
$reason = isset($params[1]) ? $params[1] : '';
if ($reason == '') $reason = _pfc("no reason");
+ // to allow unquotted reason
+ if (count($params) > 2)
+ for ($x=2;$x<count($params);$x++)
+ $reason.=" ".$params[$x];
+
if ($nick == '')
{
// error
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|