3
0
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:
Pragmatic Software 2010-04-02 18:23:31 +00:00
parent 0b78e4ed79
commit 0c54d9c93e
2 changed files with 3 additions and 1 deletions

View File

@ -102,7 +102,9 @@ sub check_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}->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");
}
}
}

View File

@ -345,7 +345,7 @@ sub interpreter {
$result =~ s/\$nick/$nick/g;
while ($result =~ /[^\\]\$([^\s!+.$\/\\,;=&]+)/g) {
while ($result =~ /[^\\]\$([a-zA-Z0-9_\-]+)/g) {
my $var = $1;
#$self->{pbot}->logger->log("adlib: got [$var]\n");
#$self->{pbot}->logger->log("adlib: parsing variable [\$$var]\n");