diff options
| author | 2016-02-09 18:36:15 -0700 | |
|---|---|---|
| committer | 2016-02-09 18:36:15 -0700 | |
| commit | 0f7bf2bf5370e2b45d228ec10ca15020c5c2fa07 (patch) | |
| tree | ba4ef8c0e8d1d2ae50891184529caf85e4a01829 /lib/ASM/Inspect.pm | |
| parent | cfa47b2ecd2f4ddca3a4719f33a3d50aee94614a (diff) | |
Clean up excessive use of lc
Diffstat (limited to 'lib/ASM/Inspect.pm')
| -rw-r--r-- | lib/ASM/Inspect.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ASM/Inspect.pm b/lib/ASM/Inspect.pm index e18572d..b4b0fbc 100644 --- a/lib/ASM/Inspect.pm +++ b/lib/ASM/Inspect.pm @@ -78,7 +78,7 @@ sub inspect { my (@dnsbl, @uniq); my ($match, $txtz, $iaddr); my @override = []; - my $nick = ($event->{type} eq 'nick') ? $event->{args}->[0] : lc $event->{nick}; + my $nick = ($event->{type} eq 'nick') ? lc $event->{args}->[0] : lc $event->{nick}; my $xresult; return if (index($nick, ".") != -1); if ( $event->{type} eq 'join' ) { @@ -119,6 +119,7 @@ sub inspect { my $evcontent = $event->{args}->[0]; my $evhost = $event->{host}; foreach $chan (@{$event->{to}}) { + $chan = lc $chan; foreach $id ( keys %dct ) { return unless (ASM::Util->notRestricted($nick, "notrigger") && ASM::Util->notRestricted($nick, "no$id")); $xresult = $dct{$id}{xresult}; @@ -128,7 +129,7 @@ sub inspect { } $txtz = "\x03" . $::RCOLOR{$::RISKS{$dct{$id}{risk}}} . "\u$dct{$id}{risk}\x03 risk threat [\x02$chan\x02] - ". "\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 . ASM::Util->commaAndify(ASM::Util->getAlert($chan, $dct{$id}{risk}, 'hilights')) if (ASM::Util->getAlert($chan, $dct{$id}{risk}, 'hilights')); $txtz = $txtz . ' !att-' . $chan . '-' . $dct{$id}{risk}; my $uuid = $::log->incident($chan, "$chan: $dct{$id}{risk} risk: $event->{nick} - $nicereason\n"); $txtz = $txtz . ' ' . ASM::Shortener->shorturl($::settings->{web}->{detectdir} . $uuid . '.txt'); |
