git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@337
c11ca15a-4712-0410-83d8-
924469b57eb5
sub on_targettoofast {
my ($self, $event) = @_;
my $nick = $event->nick();
sub on_targettoofast {
my ($self, $event) = @_;
my $nick = $event->nick();
- my $chan = ($event->to)[0];
-
- &DEBUG("on_targettoofast: nick => '$nick'.");
- &DEBUG("on_targettoofast: chan => '$chan'.");
-
- foreach ($event->args) {
- &DEBUG("on_targettoofast: args => '$_'.");
- }
+ my($me,$chan,$why) = $event->args();
### .* wait (\d+) second/) {
&status("X1 $msg");
### .* wait (\d+) second/) {
&status("X1 $msg");
&status("going to sleep for $sleep...");
sleep $sleep;
&joinNextChan();
&status("going to sleep for $sleep...");
sleep $sleep;
&joinNextChan();
### public != personal who so the below is kind of pointless.
my @who;
foreach (keys %flood) {
### public != personal who so the below is kind of pointless.
my @who;
foreach (keys %flood) {
- next if (/^\Q$floodwho\E$/ or /^\Q$chan\E$/);
+ next if (/^\Q$floodwho\E$/);
+ next if (defined $chan and /^\Q$chan\E$/);
+
push(@who, grep /^\Q$message\E$/i, keys %{$flood{$_}});
}
push(@who, grep /^\Q$message\E$/i, keys %{$flood{$_}});
}
if (scalar @who) {
&msg($who, "you already said what ".
join(' ', @who)." have said.");
if (scalar @who) {
&msg($who, "you already said what ".
join(' ', @who)." have said.");