From: dms Date: Fri, 15 Dec 2000 14:25:05 +0000 (+0000) Subject: added '.mode' for Netsnipe X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=2d11e42601d8a83f65fb14ed50cda5b3b707cb7f;p=infobot.git added '.mode' for Netsnipe git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@197 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/src/Modules/UserDCC.pl b/src/Modules/UserDCC.pl index 8112f49..273c6b6 100644 --- a/src/Modules/UserDCC.pl +++ b/src/Modules/UserDCC.pl @@ -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"));