summaryrefslogtreecommitdiffstats
path: root/modules/actions.pl
diff options
context:
space:
mode:
authorLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2007-06-29 02:21:38 +0000
committerLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2007-06-29 02:21:38 +0000
commitf52c9bd6e6e018ff0c45f1dea4ded2aeb4ae1427 (patch)
tree395c0133072d89da4a936e0a180e836997c1cb56 /modules/actions.pl
parent6907da0a5da3d45a91c3ac4893e5b890200b27eb (diff)
lots of modularization done, needs testing and is unstable
Diffstat (limited to 'modules/actions.pl')
-rw-r--r--modules/actions.pl41
1 files changed, 14 insertions, 27 deletions
diff --git a/modules/actions.pl b/modules/actions.pl
index 7d6717d..386e51a 100644
--- a/modules/actions.pl
+++ b/modules/actions.pl
@@ -4,45 +4,32 @@ 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}";
+ my ($conn, $event, $chan) = @_;
+ $::oq->o_send( $conn, "mode $chan +b *!*\@$event->{host}" );
+ return "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}";
+ my ($conn, $event, $chan) = @_;
+ $::oq->o_send($conn, "mode $chan +b *!*\@$event->{host}");
+ $::oq->o_send($conn, "kick $chan $event->{nick} :Spamming");
+ return "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}");
+ my ($conn, $event, $chan) = @_;
+ $::oq->o_send($conn, "kick $chan $event->{nick} :Spamming");
+ return "";
}
sub Actions::none {
- return;
+ 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;
+ my ($conn, $event, $chan) = @_;
+ $::oq->o_send( $conn, "mode $chan +b %*!*\@$event->{host}" );
+ return "mode $chan -b %*!*\@$event->{host}";
}
return 1;