1
mirror of git://git.acid.vegas/archive.git synced 2024-11-23 00:26:40 +00:00
archive/scripts/irssi/antifuckyou.pl
2023-09-12 15:47:16 -04:00

22 lines
515 B
Perl

# AntiFuckYou (SAJOIN Auto-Part Script)
# Developed by acidvegas in Perl
# http://github.com/acidvegas/irssi
# antifuckyou.pl
use strict;
use Irssi;
sub anti_fuckyou {
my ($server, $msg, $nick, $address, $target) = @_;
if ($msg =~ /You were forced to join.*/) {
my $rand = &getRandom();
my $server_addr = $server->{real_address};
if ($nick eq $server_addr) {
$msg =~ s/.*\W(\w)/$1/;
$server->command("PART #$msg");
}
}
}
Irssi::signal_add('message irc notice', 'anti_fuckyou');