From d7aa95f5ee6f1d03c707f5a1ecc87f6c3dee0b05 Mon Sep 17 00:00:00 2001 From: William Heimbigner Date: Wed, 30 May 2012 22:12:30 +0000 Subject: make rules private, properly handle ghosting/releasing, added a proxy list, much faster join/startup --- modules/services.pl | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'modules/services.pl') diff --git a/modules/services.pl b/modules/services.pl index e2c53e0..aafe68e 100644 --- a/modules/services.pl +++ b/modules/services.pl @@ -22,15 +22,19 @@ sub doServices { elsif ( $event->{args}->[0] =~ /^You are now identified/ ) { my @autojoins = @{$::settings->{autojoins}}; - while (@autojoins) { - my $joinstr = join (',', shift @autojoins, shift @autojoins, shift @autojoins, shift @autojoins); - $conn->schedule($i, sub { $conn->join($joinstr); }); - $i += 7; - } - $conn->schedule($i-6, sub { $conn->privmsg('#antispammeta', 'Now joined to all channels in '. (time - $::starttime) . " seconds."); }); +# while (@autojoins) { +# my $joinstr = join (',', shift @autojoins, shift @autojoins, shift @autojoins, shift @autojoins, shift @autojoins, +# shift @autojoins, shift @autojoins, shift @autojoins, shift @autojoins, shift @autojoins); +# $conn->schedule($i, sub { $conn->join($joinstr); }); +# $i += 1; +# } + $conn->join(join(',', @autojoins[0..30])); + $conn->join(join(',', @autojoins[30..60])); + $conn->schedule(2, sub { $conn->privmsg('#antispammeta', 'Now joined to all channels in '. (time - $::starttime) . " seconds."); }); } - elsif ($event->{args}->[0] =~ /has been killed$/ ) + elsif ($event->{args}->[0] =~ /has been (killed|released)/ ) { + print "Got kill/release successful from nickserv!\n" if $::debugx{services}; $conn->nick( $::settings->{nick} ); } elsif ($event->{args}->[0] =~ /Password Incorrect/ ) -- cgit v1.2.3