mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-19 10:29:30 +01:00
Remove FLOOD_JOIN and FLOOD_CHAT from PBot.pm
This commit is contained in:
parent
8c4d01d83a
commit
96fd2d7c7a
@ -155,12 +155,12 @@ sub on_join {
|
|||||||
my ($nick, $user, $host, $channel) = ($event->nick, $event->user, $event->host, $event->to);
|
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}->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 {
|
sub on_departure {
|
||||||
my ($self, $conn, $event) = @_;
|
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
|
=cut
|
||||||
if(exists $admins{$nick} && exists $admins{$nick}{login}) {
|
if(exists $admins{$nick} && exists $admins{$nick}{login}) {
|
||||||
|
@ -73,7 +73,7 @@ sub process_line {
|
|||||||
|
|
||||||
my $pbot = $self->pbot;
|
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) {
|
if($text =~ /^.?$mynick.?\s+(.*?)([\?!]*)$/i) {
|
||||||
$command = "$1";
|
$command = "$1";
|
||||||
|
@ -104,8 +104,6 @@ sub initialize {
|
|||||||
$self->{max_msg_len} = $max_msg_len;
|
$self->{max_msg_len} = $max_msg_len;
|
||||||
$self->{MAX_FLOOD_MESSAGES} = $MAX_FLOOD_MESSAGES;
|
$self->{MAX_FLOOD_MESSAGES} = $MAX_FLOOD_MESSAGES;
|
||||||
$self->{MAX_NICK_MESSAGES} = $MAX_NICK_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);
|
my $logger = PBot::Logger->new(log_file => $log_file);
|
||||||
$self->{logger} = $logger;
|
$self->{logger} = $logger;
|
||||||
|
@ -13,7 +13,7 @@ use warnings;
|
|||||||
# These are set automatically by the build/commit script
|
# These are set automatically by the build/commit script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 147,
|
BUILD_REVISION => 148,
|
||||||
BUILD_DATE => "2010-06-05",
|
BUILD_DATE => "2010-06-05",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user