<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>131956</bug_id>
          
          <creation_ts>2006-08-06 16:18:57 +0000</creation_ts>
          <short_desc>kickban available from context menu, but /kickban returns an error</short_desc>
          <delta_ts>2006-08-06 21:58:44 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>konversation</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>unspecified</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>wishlist</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Niek Beernink">n.beernink</reporter>
          <assigned_to name="Konversation Bugs">konversation-bugs-null</assigned_to>
          
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>458469</commentid>
    <comment_count>0</comment_count>
    <who name="Niek Beernink">n.beernink</who>
    <bug_when>2006-08-06 16:18:57 +0000</bug_when>
    <thetext>Version:           revision 570312 (using KDE KDE 3.5.4)
Compiler:          gcc (GCC) 4.1.2 20060715 (prerelease) (Ubuntu 4.1.1-9ubuntu1) 

/kickban nick
[Error] kickban: Unknown command.

Right-click nick =&gt; Kick/ban =&gt; Kickban works

Did it went missing after we lost half the list of quickbuttons?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>458487</commentid>
    <comment_count>1</comment_count>
    <who name="Eike Hein">hein</who>
    <bug_when>2006-08-06 19:02:06 +0000</bug_when>
    <thetext>Change to wishlist.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>458505</commentid>
    <comment_count>2</comment_count>
    <who name="Eike Hein">hein</who>
    <bug_when>2006-08-06 21:58:44 +0000</bug_when>
    <thetext>SVN commit 570456 by hein:

Implement /kickban. Same parameters as /ban plus [reason].
BUG:131956


 M  +1 -1      inputfilter.cpp  
 M  +30 -9     outputfilter.cpp  
 M  +1 -1      outputfilter.h  


--- trunk/extragear/network/konversation/src/inputfilter.cpp #570455:570456
@@ -450,7 +450,7 @@
                         // Identify command if specified
                         server-&gt;registerWithServices();
                     }
-                    if (server-&gt;identifyMsg())
+                    else if (server-&gt;identifyMsg())
                         trailing = trailing.mid(1);
 
                     if(trailing.lower() == &quot;password accepted - you are now recognized&quot;
--- trunk/extragear/network/konversation/src/outputfilter.cpp #570455:570456
@@ -187,6 +187,7 @@
             else if(command == &quot;oper&quot;)     result = parseOper(myNick,parameter);
             else if(command == &quot;ban&quot;)      result = parseBan(parameter);
             else if(command == &quot;unban&quot;)    result = parseUnban(parameter);
+            else if(command == &quot;kickban&quot;)      result = parseBan(parameter,true);
             else if(command == &quot;ignore&quot;)   result = parseIgnore(parameter);
             else if(command == &quot;unignore&quot;) result = parseUnignore(parameter);
             else if(command == &quot;quote&quot;)    result = parseQuote(parameter);
@@ -975,7 +976,7 @@
         return result;
     }
 
-    OutputFilterResult OutputFilter::parseBan(const QString&amp; parameter)
+    OutputFilterResult OutputFilter::parseBan(const QString&amp; parameter, bool kick)
     {
         OutputFilterResult result;
         // assume incorrect syntax first
@@ -993,34 +994,51 @@
             bool udomain = (parameterList[0].lower() == &quot;-userdomain&quot;);
 
             // remove possible option
-            if(host || domain || uhost || udomain)
+            if (host || domain || uhost || udomain)
             {
                 option = parameterList[0].mid(1);
                 parameterList.pop_front();
             }
 
             // look for channel / ban mask
-            if(parameterList.count())
+            if (parameterList.count())
             {
                 // user specified channel
-                if(isAChannel(parameterList[0]))
+                if (isAChannel(parameterList[0]))
                 {
                     channel = parameterList[0];
                     parameterList.pop_front();
                 }
                 // no channel, so assume current destination as channel
-                else if(isAChannel(destination))
+                else if (isAChannel(destination))
                     channel = destination;
                 else
                 {
                     // destination is no channel =&gt; error
-                    result = error(i18n(&quot;%1BAN without channel name works only from inside a channel.&quot;).arg(commandChar));
+                    if (!kick)
+                        result = error(i18n(&quot;%1BAN without channel name works only from inside a channel.&quot;).arg(commandChar));
+                    else
+                        result = error(i18n(&quot;%1KICKBAN without channel name works only from inside a channel.&quot;).arg(commandChar));
+
                     // no usage information after error
                     showUsage = false;
                 }
                 // signal server to ban this user if all went fine
-                if(!channel.isEmpty())
+                if (!channel.isEmpty())
                 {
+                    if (kick)
+                    {
+                        QString reason;
+
+                        if (parameterList.count()&gt;1)
+                        {
+                            reason = parameterList.last();
+                            parameterList.remove(parameterList.last());
+                        }
+
+                        result.toServer = &quot;KICK &quot; + channel + &apos; &apos; + parameterList[0] + &quot; :&quot; + reason;
+                    }
+
                     emit banUsers(parameterList,channel,option);
                     // syntax was correct, so reset flag
                     showUsage = false;
@@ -1028,9 +1046,12 @@
             }
         }
 
-        if(showUsage)
+        if (showUsage)
         {
-            result = usage(i18n(&quot;Usage: %1BAN [-HOST | -DOMAIN] [channel] &lt;user|mask&gt;&quot;).arg(commandChar));
+            if (!kick)
+                result = usage(i18n(&quot;Usage: %1BAN [-HOST | -DOMAIN] [channel] &lt;user|mask&gt;&quot;).arg(commandChar));
+            else
+                result = usage(i18n(&quot;Usage: %1KICKBAN [-HOST | -DOMAIN] [channel] &lt;user|mask&gt; [reason]&quot;).arg(commandChar));
         }
 
         return result;
--- trunk/extragear/network/konversation/src/outputfilter.h #570455:570456
@@ -100,7 +100,7 @@
             OutputFilterResult parseQuit(const QString&amp; parameter);
             OutputFilterResult parseKick(const QString&amp; parameter);
             OutputFilterResult parseKickBan(const QString&amp; parameter);
-            OutputFilterResult parseBan(const QString&amp; parameter);
+            OutputFilterResult parseBan(const QString&amp; parameter, bool kick = false);
             OutputFilterResult parseUnban(const QString&amp; parameter);
             OutputFilterResult parseNames(const QString&amp; parameter);
             OutputFilterResult parseList(const QString&amp; parameter);
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>