mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 05:49:27 +01:00
Send message on private ignore; parse adlib variables better
This commit is contained in:
parent
0b78e4ed79
commit
0c54d9c93e
@ -102,7 +102,9 @@ sub check_flood {
|
|||||||
}
|
}
|
||||||
} else { # private message flood
|
} else { # private message flood
|
||||||
$self->{pbot}->logger->log("$nick msg flood offense ${ $self->message_history }{$nick}{$channel}{offenses} earned $length second ignore\n");
|
$self->{pbot}->logger->log("$nick msg flood offense ${ $self->message_history }{$nick}{$channel}{offenses} earned $length second ignore\n");
|
||||||
|
$self->{pbot}->conn->privmsg($nick, "You have used too many commands in too short a time period, you have been ignored for $length seconds.");
|
||||||
$self->{pbot}->{ignorelistcmds}->ignore_user("", "floodcontrol", "", "", "$nick!$user\@$host $channel $length");
|
$self->{pbot}->{ignorelistcmds}->ignore_user("", "floodcontrol", "", "", "$nick!$user\@$host $channel $length");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -345,7 +345,7 @@ sub interpreter {
|
|||||||
|
|
||||||
$result =~ s/\$nick/$nick/g;
|
$result =~ s/\$nick/$nick/g;
|
||||||
|
|
||||||
while ($result =~ /[^\\]\$([^\s!+.$\/\\,;=&]+)/g) {
|
while ($result =~ /[^\\]\$([a-zA-Z0-9_\-]+)/g) {
|
||||||
my $var = $1;
|
my $var = $1;
|
||||||
#$self->{pbot}->logger->log("adlib: got [$var]\n");
|
#$self->{pbot}->logger->log("adlib: got [$var]\n");
|
||||||
#$self->{pbot}->logger->log("adlib: parsing variable [\$$var]\n");
|
#$self->{pbot}->logger->log("adlib: parsing variable [\$$var]\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user