rendered paste body#!/usr/bin/perl -w
use strict;
use Irssi;
use vars qw($VERSION %IRSSI);
$VERSION = "1.0";
%IRSSI = (
authors => 'Mad Camel',
contact => 'madcamel@gmail.com',
name => 'zline.pl',
description => 'This script zlines IPs that are connection flooding InspIRCD',
license => 'GNU General Public License',
url => 'None',
changed => 'Sat Apr 23 09:53:50 EDT 2011',
);
sub zline_check {
my ($dest, $text) = @_;
return if (($text !~ /^NOTICE/));
if ($text =~ /exceeded for IP (.+)/) {
$dest->command("QUOTE ZLINE $1 10m :Connection Flood - take a 10 minute break");
}
}
Irssi::signal_add_first('server event', 'zline_check');