diff options
| author | 2012-01-26 09:32:27 +0000 | |
|---|---|---|
| committer | 2012-01-26 09:32:27 +0000 | |
| commit | 13784acc824dab355f82e09ca7828f9bddacf880 (patch) | |
| tree | b421341cebdaf4000309bb577cb57fb28781e52e /modules | |
| parent | d07473ba85ec8ab030162e68244575f2c87e0389 (diff) | |
more fat trimming
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/event.pl | 1 | ||||
| -rw-r--r-- | modules/inspect.pl | 8 | ||||
| -rw-r--r-- | modules/services.pl | 10 | ||||
| -rw-r--r-- | modules/util.pl | 26 |
4 files changed, 3 insertions, 42 deletions
diff --git a/modules/event.pl b/modules/event.pl index 95df7f4..a8a9d99 100644 --- a/modules/event.pl +++ b/modules/event.pl @@ -89,7 +89,6 @@ sub on_join { $::sc{$chan} = {}; mkdir($::settings->{log}->{dir} . $chan); $conn->sl("who $chan"); - $conn->privmsg('ChanServ', "op $chan" ) if (defined cs($chan)->{op}) && (cs($chan)->{op} eq 'yes'); # I don't know what the hell this was for but I'm disabling it for now # #TODO: make it settable via config. Hardcoded channames ftl. # if ($chan eq '##linux') { diff --git a/modules/inspect.pl b/modules/inspect.pl index 72a5438..f77d727 100644 --- a/modules/inspect.pl +++ b/modules/inspect.pl @@ -17,13 +17,11 @@ sub new sub inspect { our ($self, $conn, $event) = @_; - my (%conx, %monx); my (%aonx, %dct, $rev, $chan, $id); %aonx=(); %dct=(); $chan=""; $id=""; - my (@dnsbl, @unpakt, @uniq, @cut); + my (@dnsbl, @uniq); my ($match, $txtz, $iaddr); my @override = []; - our $unmode=''; my $nick = lc $event->{nick}; my $xresult; return if (index($nick, ".") != -1); @@ -46,8 +44,7 @@ sub inspect { next unless ( grep { $event->{type} eq $_ } split(/[,:; ]+/, $aonx{$id}{type}) ); next if ($aonx{$id}{class} eq 'dnsbl') && ($event->{host} =~ /(fastwebnet\.it|fastres\.net)$/); #this is a bad hack $xresult = $::classes->check($aonx{$id}{class}, $aonx{$id}, $id, $event, $chan, $rev); # this is another bad hack done for dnsbl-related stuff - next if defined($xresult) == 0; - next if $xresult eq 0; + next unless (defined($xresult)) && ($xresult ne 0); ASM::Util->dprint(Dumper( $xresult )); $dct{$id} = $aonx{$id}; $dct{$id}{xresult} = $xresult; @@ -59,7 +56,6 @@ sub inspect { } } delete $dct{$_} foreach @override; - my $mylastreason = $::lastreason; my $evcontent = $event->{args}->[0]; my $evhost = $event->{host}; foreach $chan (@{$event->{to}}) { diff --git a/modules/services.pl b/modules/services.pl index 1306381..594e2e0 100644 --- a/modules/services.pl +++ b/modules/services.pl @@ -38,18 +38,10 @@ sub doServices { elsif ($event->{from} eq 'ChanServ!ChanServ@services.') { print "ChanServ: $event->{args}->[0] \n"; - if ($event->{args}->[0] =~ /You are already opped on \[.(.*).\]/) - { - $::oq->doQueue($conn, $1); - } - elsif ( $event->{args}->[0] =~ /^All.*bans matching.*have been cleared on(.*)/) + if ( $event->{args}->[0] =~ /^All.*bans matching.*have been cleared on(.*)/) { $conn->join($1); } - elsif ( $event->{args}->[0] =~ /You are not authorized to perform this operation/ ) - { - $::oq->clean(); - } } } diff --git a/modules/util.pl b/modules/util.pl index 0a5c6c4..109882b 100644 --- a/modules/util.pl +++ b/modules/util.pl @@ -4,7 +4,6 @@ use warnings; use strict; my %sf; -my %oq; %::RISKS = ( @@ -114,31 +113,6 @@ sub hostip { return gethostbyname($_[0]); } -# Send something that requires ops -sub o_send { - my ( $conn, $send ) = @_; - my @splt = split(/ /, $send); - my $chan = lc $splt[1]; - $oq{$chan} = [] unless defined($oq{$chan}); - if ( cs($chan)->{op} ne 'no' ) { - print Dumper(lc $::settings->{nick}, $::sc{$chan}{users}{lc $::settings->{nick}}); - print Dumper($send, $chan); - if ( $::sc{$chan}{users}{lc $::settings->{nick}}{op} eq 1) { - $conn->sl($send); - } - else { - push( @{$oq{$chan}},$send ); - $conn->privmsg( 'chanserv', "op $chan" ); - } - } -} - -sub doQueue { - my ( $conn, $chan ) = @_; - return unless defined $oq{$chan}; - $conn->sl(shift(@{$oq{$chan}})) while (@{$oq{$chan}}); -} - sub flood_add { my ( $chan, $id, $host, $to ) = @_; push( @{$sf{$id}{$chan}{$host}}, time ); |
