summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2012-01-26 07:30:51 +0000
committerLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2012-01-26 07:30:51 +0000
commitba0006ae95cf173b49aff9c92f27ebbc61b62c5b (patch)
tree1fae80002c913d64fda34196dd14d6504111e20a /modules
parentda97c860482c204dc9de7adea69954fd3d624581 (diff)
disable some odd channel counting stuff, print a message when it finds itself banned from a channel, and some preliminary code to detect netjoins
Diffstat (limited to 'modules')
-rw-r--r--modules/event.pl23
1 files changed, 18 insertions, 5 deletions
diff --git a/modules/event.pl b/modules/event.pl
index e25066b..ab4fb1a 100644
--- a/modules/event.pl
+++ b/modules/event.pl
@@ -74,16 +74,28 @@ sub on_join {
my $evcopy = \%evcopyx;
my $nick = lc $event->{nick};
my $chan = lc $event->{to}->[0];
+ my $rate;
+ push( @::joinrate, time );
+ while ( time >= $::joinrate[0] + 1 ) {
+ last if ( $#{ @::joinrate } == 0 );
+ shift( @::joinrate );
+ }
+ $rate = $#{ @::joinrate}+1;
+ print "on_join rate = $rate\n" if $::debug;
+ if ( $rate == 20 ) {
+ $conn->privmsg('##asb-nexus', "AfterDeath: I think I'm seeing a netjoin!");
+ }
if ( lc $conn->{_nick} eq lc $nick) {
$::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');
- #TODO: make it settable via config. Hardcoded channames ftl.
- if ($chan eq '##linux') {
- $conn->schedule(300, \&do_chancount, $chan, 300);
- #TODO: mark this as a channel we're watching so we don't schedule this multiple times
- }
+# 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') {
+# $conn->schedule(300, \&do_chancount, $chan, 300);
+# #TODO: mark this as a channel we're watching so we don't schedule this multiple times
+# }
}
$::sc{$chan}{users}{$nick} = {};
$::sc{$chan}{users}{$nick}{hostmask} = $event->{userhost};
@@ -432,6 +444,7 @@ sub on_whoreply
sub on_bannedfromchan {
my ($conn, $event) = @_;
$conn->privmsg('ChanServ', "unban $event->{args}->[1]");
+ print "I'm banned from " . $event->{args}->[1] . "... attempting to unban myself\n";
}
sub on_byechan {