From f52c9bd6e6e018ff0c45f1dea4ded2aeb4ae1427 Mon Sep 17 00:00:00 2001 From: William Heimbigner Date: Fri, 29 Jun 2007 02:21:38 +0000 Subject: lots of modularization done, needs testing and is unstable --- modules/actions.pl | 41 ++++++++++++++--------------------------- 1 file changed, 14 insertions(+), 27 deletions(-) (limited to 'modules/actions.pl') 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; -- cgit v1.2.3