archive- Random tools & helpful resources for IRC |
git clone git://git.acid.vegas/archive.git |
Log | Files | Refs | Archive |
antifuckyou.pl (515B)
1 # AntiFuckYou (SAJOIN Auto-Part Script) 2 # Developed by acidvegas in Perl 3 # http://github.com/acidvegas/irssi 4 # antifuckyou.pl 5 6 use strict; 7 use Irssi; 8 9 sub anti_fuckyou { 10 my ($server, $msg, $nick, $address, $target) = @_; 11 if ($msg =~ /You were forced to join.*/) { 12 my $rand = &getRandom(); 13 my $server_addr = $server->{real_address}; 14 if ($nick eq $server_addr) { 15 $msg =~ s/.*\W(\w)/$1/; 16 $server->command("PART #$msg"); 17 } 18 } 19 } 20 21 Irssi::signal_add('message irc notice', 'anti_fuckyou');