diff options
| author | 2012-02-27 03:48:24 +0000 | |
|---|---|---|
| committer | 2012-02-27 03:48:24 +0000 | |
| commit | 271692ab95d1cd9e24ee673a867fab37f865800d (patch) | |
| tree | ef8066fb60153fd12d135dbfa3c7c60a47872c8b /modules | |
| parent | 351d7ac4369aa8bf0110fd42b06112262225fe3b (diff) | |
Tweaked stuff to utilise send privmsg-to-multiple-targets (This will probably break the bot even worse on some networks, fixed a bug that made xresult show up in channels.xml, and added skeleton code for responding to last measure links
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/inspect.pl | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/modules/inspect.pl b/modules/inspect.pl index f77d727..f6b8dd1 100644 --- a/modules/inspect.pl +++ b/modules/inspect.pl @@ -67,20 +67,24 @@ sub inspect { "\x02$event->{nick}\x02 - ${nicereason}; ping "; $txtz = $txtz . ASM::Util->commaAndify(ASM::Util->getAlert(lc $chan, $dct{$id}{risk}, 'hilights')) if (ASM::Util->getAlert(lc $chan, $dct{$id}{risk}, 'hilights')); $txtz = $txtz . ' !att-' . $chan . '-' . $dct{$id}{risk}; + if ($id eq 'last_measure_regex') { #TODO: Note that this is another example of things that shouldn't be hardcoded, but are. + + } unless (defined($::ignored{$chan}) && ($::ignored{$chan} >= $::RISKS{$dct{$id}{risk}})) { my @tgts = ASM::Util->getAlert($chan, $dct{$id}{risk}, 'msgs'); - foreach my $tgt (@tgts) { #unfortunately wikipedia has way too many ops, and it breaks things +# foreach my $tgt (@tgts) { #unfortunately wikipedia has way too many ops, and it breaks things if (length($txtz) <= 380) { - $conn->privmsg($tgt, $txtz); + $conn->privmsg(\@tgts, $txtz); } else { my $splitpart = rindex($txtz, " ", 380); - $conn->privmsg($tgt, substr($txtz, 0, $splitpart)); - $conn->privmsg($tgt, substr($txtz, $splitpart)); + $conn->privmsg(\@tgts, substr($txtz, 0, $splitpart)); + $conn->privmsg(\@tgts, substr($txtz, $splitpart)); } - } +# } $::ignored{$chan} = $::RISKS{$dct{$id}{risk}}; $conn->schedule(45, sub { delete($::ignored{$chan})}); } + delete $dct{$id}{xresult}; } } } |
