]> git.donarmstrong.com Git - infobot.git/commitdiff
- kick now accepts kick message. Patch from <morten@wtf.dk>. Thanks!
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 6 Mar 2003 18:39:57 +0000 (18:39 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Thu, 6 Mar 2003 18:39:57 +0000 (18:39 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@772 c11ca15a-4712-0410-83d8-924469b57eb5

src/Modules/UserDCC.pl

index 262276424dc563d0be3c2d80350a5b83b818564c..39bf57501d094b253d3d464ae22ef1e77ba8e5ca 100644 (file)
@@ -135,14 +135,17 @@ sub userDCC {
     }
 
     # kick.
-    if ($message =~ /^kick(\s+(\S+)(\s+(\S+))?)?/) {
+    if ($message =~ /^kick(\s+(.*?))$/) {
        return unless (&hasFlag("o"));
-       my ($nick,$chan) = (lc $2,lc $4);
 
-       if ($nick eq "") {
+       my $arg = $2;
+
+       if ($arg eq "") {
            &help("kick");
            return;
        }
+       my @args = split(/\s+/, $arg);
+       my ($nick,$chan,$reason) = @args;
 
        if (&validChan($chan) == 0) {
            &msg($who,"error: invalid channel \002$chan\002");
@@ -154,12 +157,12 @@ sub userDCC {
            return;
        }
 
-       &kick($nick,$chan);
+       &kick($nick,$chan,$reason);
 
        return;
     }
 
-    # kick.
+    # mode.
     if ($message =~ /^mode(\s+(.*))?$/) {
        return unless (&hasFlag("n"));
        my ($chan,$mode) = split /\s+/,$2,2;
@@ -1150,7 +1153,6 @@ sub userDCC {
 
        &writeUserFile();
        &writeChanFile();
-       &News::writeNews() if (&ChanConfList("news"));
 
        return;
     }