summaryrefslogtreecommitdiffstats
path: root/modules/actions.pl
diff options
context:
space:
mode:
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;