3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-10-01 17:16:39 +02:00

Remove FLOOD_JOIN and FLOOD_CHAT from PBot.pm

This commit is contained in:
Pragmatic Software 2010-06-06 04:41:15 +00:00
parent 8c4d01d83a
commit 96fd2d7c7a
4 changed files with 4 additions and 6 deletions

View File

@ -155,12 +155,12 @@ sub on_join {
my ($nick, $user, $host, $channel) = ($event->nick, $event->user, $event->host, $event->to);
#$self->{pbot}->logger->log("$nick!$user\@$host joined $channel\n");
$self->{pbot}->antiflood->check_flood($channel, $nick, $user, $host, "JOIN", 3, 60 * 30, $self->{pbot}->{FLOOD_JOIN});
$self->{pbot}->antiflood->check_flood($channel, $nick, $user, $host, "JOIN", 3, 60 * 30, $self->{pbot}->antiflood->{FLOOD_JOIN});
}
sub on_departure {
my ($self, $conn, $event) = @_;
my ($nick, $host, $channel) = ($event->nick, $event->host, $event->to);
my ($nick, $user, $host, $channel) = ($event->nick, $event->user, $event->host, $event->to);
=cut
if(exists $admins{$nick} && exists $admins{$nick}{login}) {

View File

@ -73,7 +73,7 @@ sub process_line {
my $pbot = $self->pbot;
$pbot->antiflood->check_flood($from, $nick, $user, $host, $text, $pbot->{MAX_FLOOD_MESSAGES}, 10, $pbot->{FLOOD_CHAT}) if defined $from;
$pbot->antiflood->check_flood($from, $nick, $user, $host, $text, $pbot->{MAX_FLOOD_MESSAGES}, 10, $pbot->antiflood->{FLOOD_CHAT}) if defined $from;
if($text =~ /^.?$mynick.?\s+(.*?)([\?!]*)$/i) {
$command = "$1";

View File

@ -104,8 +104,6 @@ sub initialize {
$self->{max_msg_len} = $max_msg_len;
$self->{MAX_FLOOD_MESSAGES} = $MAX_FLOOD_MESSAGES;
$self->{MAX_NICK_MESSAGES} = $MAX_NICK_MESSAGES;
$self->{FLOOD_CHAT} = 0;
$self->{FLOOD_JOIN} = 1;
my $logger = PBot::Logger->new(log_file => $log_file);
$self->{logger} = $logger;

View File

@ -13,7 +13,7 @@ use warnings;
# These are set automatically by the build/commit script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 147,
BUILD_REVISION => 148,
BUILD_DATE => "2010-06-05",
};