diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/classes.pl | 5 | ||||
| -rw-r--r-- | modules/event.pl | 7 | ||||
| -rw-r--r-- | modules/inspect.pl | 2 | ||||
| -rw-r--r-- | modules/mysql.pl | 2 |
4 files changed, 9 insertions, 7 deletions
diff --git a/modules/classes.pl b/modules/classes.pl index 6896ce7..d747815 100644 --- a/modules/classes.pl +++ b/modules/classes.pl @@ -78,6 +78,7 @@ sub dnsbl # return unless index($event->{host}, '/') == -1; # hopefully getting rid of this won't cause shit to assplode # but I'm getting rid of it so it can detect cgi:irc shit + return 0; if (defined $rev) { print "Querying $rev$chk->{content}\n" if $::debugx{dnsbl}; my $iaddr = gethostbyname( "$rev$chk->{content}" ); @@ -151,7 +152,7 @@ sub splitflood { $text=$event->{args}->[0]; } return unless defined($text); - return unless length($text) >= 10; +# return unless length($text) >= 10; if (defined($bs{$id}{$text}) && (time <= $bs{$id}{$text} + 600)) { return 1; } @@ -181,7 +182,7 @@ sub advsplitflood { $text=$event->{args}->[0]; } return unless defined($text); - $text=~s/^\d+(.*)\d+$/$1/; + $text=~s/^\d*(.*)\d*$/$1/; return unless length($text) >= 10; if (defined($bs{$id}{$text}) && (time <= $bs{$id}{$text} + 600)) { return 1; diff --git a/modules/event.pl b/modules/event.pl index f2c6695..39c733d 100644 --- a/modules/event.pl +++ b/modules/event.pl @@ -127,6 +127,7 @@ sub on_account sub on_connect { my ($conn, $event) = @_; # need to check for no services + $conn->sl('MODE AntiSpamMeta +Q'); $conn->privmsg( 'NickServ', "ghost $::settings->{nick} $::settings->{pass}" ) if lc $event->{args}->[0] ne lc $::settings->{nick}; $conn->sl('CAP REQ :extended-join multi-prefix account-notify'); #god help you if you try to use this bot off freenode } @@ -200,7 +201,7 @@ sub on_msg my ($conn, $event) = @_; $::commander->command($conn, $event); print strftime("%F %T ", gmtime) . "(msg) " . $event->{from} . " - " . $event->{args}->[0] . "\n"; - $conn->privmsg('##asb-nexus', $event->{from} . ' told me: ' . $event->{args}->[0]); + $conn->privmsg('#antispammeta', $event->{from} . ' told me: ' . $event->{args}->[0]); } sub on_public @@ -241,9 +242,9 @@ sub on_quit $event->{to} = \@channels; $::db->logg( $event ); if (($::netsplit == 0) && ($event->{args}->[0] eq "*.net *.split")) { #special, netsplit situation - $conn->privmsg("##asb-nexus", "Entering netsplit mode - JOIN and QUIT inspection will be disabled for 60 minutes"); + $conn->privmsg("#antispammeta", "Entering netsplit mode - JOIN and QUIT inspection will be disabled for 60 minutes"); $::netsplit = 1; - $conn->schedule(60*60, sub { $::netsplit = 0; $conn->privmsg('##asb-nexus', 'Returning to regular operation'); }); + $conn->schedule(60*60, sub { $::netsplit = 0; $conn->privmsg('#antispammeta', 'Returning to regular operation'); }); } $::inspector->inspect( $conn, $event ) unless $::netsplit; $::log->logg( $event ); diff --git a/modules/inspect.pl b/modules/inspect.pl index f6b8dd1..c3a9c1a 100644 --- a/modules/inspect.pl +++ b/modules/inspect.pl @@ -32,7 +32,7 @@ sub inspect { } } else { - $iaddr = gethostbyname($event->{host}); +# $iaddr = gethostbyname($event->{host}); $rev = join('.', reverse(unpack('C4', $iaddr))).'.' if (defined $iaddr); } ## NB: isn't there a better way to do this with grep, somehow? diff --git a/modules/mysql.pl b/modules/mysql.pl index 23f9dae..ff4e0da 100644 --- a/modules/mysql.pl +++ b/modules/mysql.pl @@ -63,13 +63,13 @@ sub record #FIXME: This function is shit. Also, it doesn't work like I want it to with mode. sub logg { - return; #Disabling logging of individual stuff to mysql. no point. my $self = shift; my ($event) = @_; my $dbh = $self->{DBH_LOG}; my $table = $event->{type}; $table = 'action' if ($table eq 'caction'); $table = 'privmsg' if ($table eq 'public'); + return if (($table eq 'action') or ($table eq 'privmsg')); #Disabling logging of privmsg stuffs to mysql. no point. my $realtable = $table; $realtable = 'joins' if $realtable eq 'join'; #mysql doesn't like a table named join my $string = 'INSERT INTO `' . $realtable . '` ('; |
