1
mirror of git://git.acid.vegas/archive.git synced 2024-11-26 18:16:40 +00:00
archive/scripts/irssi/antifuckyou.pl

22 lines
515 B
Perl
Raw Normal View History

2023-09-12 19:47:16 +00:00
# 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');