]> git.donarmstrong.com Git - infobot.git/commitdiff
added '.mode' for Netsnipe
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 15 Dec 2000 14:25:05 +0000 (14:25 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 15 Dec 2000 14:25:05 +0000 (14:25 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@197 c11ca15a-4712-0410-83d8-924469b57eb5

src/Modules/UserDCC.pl

index 8112f49dbe9ae9da77c3aedbc93f20669393f992..273c6b6f1ba4eab931a4f2d02f188751de6dc781 100644 (file)
@@ -131,6 +131,31 @@ sub userDCC {
        return $noreply;
     }
 
+    # kick.
+    if ($message =~ /^mode(\s+(.*))?$/) {
+       return $noreply unless (&hasFlag("m"));
+       my ($chan,$mode) = split /\s+/,$2,2;
+
+       if ($chan eq "") {
+           &help("mode");
+           return $noreply;
+       }
+
+       if (&validChan($chan) == 0) {
+           &msg($who,"error: invalid channel \002$chan\002");
+           return $noreply;
+       }
+
+       if (!$channels{$chan}{o}{$ident}) {
+           &msg($who,"error: don't have ops on \002$chan\002");
+           return $noreply;
+       }
+
+       &mode($chan, $mode);
+
+       return $noreply;
+    }
+
     # part.
     if ($message =~ /^part(\s+(\S+))?$/i) {
        return $noreply unless (&hasFlag("o"));