summaryrefslogtreecommitdiffstats
path: root/modules/actions.pl
diff options
context:
space:
mode:
authorLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2007-06-06 21:30:25 +0000
committerLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2007-06-06 21:30:25 +0000
commit04c4d4ae0d6fdfe9e59a50e79b40047a08feefb7 (patch)
tree3db7aa17c73151e038f08e3cd0c1b2faffc0c482 /modules/actions.pl
parent110cb874fc58ae4a214889bb8d6545201a57dd2f (diff)
Added files
Diffstat (limited to 'modules/actions.pl')
-rw-r--r--modules/actions.pl48
1 files changed, 48 insertions, 0 deletions
diff --git a/modules/actions.pl b/modules/actions.pl
new file mode 100644
index 0000000..7d6717d
--- /dev/null
+++ b/modules/actions.pl
@@ -0,0 +1,48 @@
+use strict;
+use warnings;
+
+#package Actions;
+
+sub Actions::ban {
+ our ($conn, $event, $unmode, $chan, %dct, $id);
+ o_send( $conn, "mode $chan +b *!*\@$event->{host}" );
+ $unmode="mode $chan -b *!*\@$event->{host}";
+}
+
+sub Actions::kban {
+ our ($conn, $event, $unmode, $chan, %dct, $id);
+ o_send($conn, "mode $chan +b *!*\@$event->{host}");
+ o_send($conn, "kick $chan $event->{nick} :$dct{$id}{reason}");
+ $unmode = "mode $chan -b *!*\@$event->{host}";
+}
+
+sub Actions::kick {
+ our ($conn, $event, $unmode, $chan, %dct, $id);
+ o_send($conn, "kick $chan $event->{nick} :$dct{$id}{reason}");
+}
+
+sub Actions::none {
+ return;
+}
+
+sub Actions::quiet {
+ our ($conn, $event, $unmode, $chan, %dct, $id);
+ o_send( $conn, "mode $chan +b %*!*\@$event->{host}" );
+ $unmode = "mode $chan -b %*!*\@$event->{host}";
+}
+
+sub Actions::fmod_wiki {
+ our ($conn, $event, $unmode, $chan, %dct, $id);
+ o_send( $conn, "mode $chan -b *!*\@$event->{host}" );
+ o_send( $conn, "mode $chan +b *!*\@$event->{host}!#wikimedia-ops" );
+}
+
+sub Actions::killsub {
+ undef &Actions::ban;
+ undef &Actions::kban;
+ undef &Actions::kick;
+ undef &Actions::none;
+ undef &Actions::quiet;
+}
+
+return 1;