summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarJanik Kleinhoff <ilbelkyr@shalture.org>2016-02-14 00:25:22 +0000
committerLibravatarJanik Kleinhoff <ilbelkyr@shalture.org>2016-02-14 00:25:22 +0000
commitb91e545add34ab42915ed054b5da18be2bff16ae (patch)
tree12d1d9467149d74054517f7a099ee2f76cbba136
parent2a94e9bf8a0a1bae94f72c57b5136f30ba1c2ab3 (diff)
downloadantispammeta-b91e545add34ab42915ed054b5da18be2bff16ae.tar.bz2
antispammeta-b91e545add34ab42915ed054b5da18be2bff16ae.tar.xz
antispammeta-b91e545add34ab42915ed054b5da18be2bff16ae.tar.zst
ASM::Inspect: for nick changes, use the new nick where appropriate
Among some other minor effects, this changes the alert for, say, -!- FriendlyUser is now known as MegaTroll9001 to specify the new nick (MegaTroll9001). Useful if you have nickfuzzy rules triggering on nick changes.
-rw-r--r--lib/ASM/Inspect.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ASM/Inspect.pm b/lib/ASM/Inspect.pm
index b4b0fbc..14796ee 100644
--- a/lib/ASM/Inspect.pm
+++ b/lib/ASM/Inspect.pm
@@ -125,13 +125,13 @@ sub inspect {
$xresult = $dct{$id}{xresult};
my $nicereason = interpolate($dct{$id}{reason});
if (defined $::db) {
- $::db->record($chan, $event->{nick}, $event->{user}, $event->{host}, $::sn{lc $event->{nick}}->{gecos}, $dct{$id}{risk}, $id, $nicereason);
+ $::db->record($chan, $nick, $event->{user}, $event->{host}, $::sn{lc $nick}->{gecos}, $dct{$id}{risk}, $id, $nicereason);
}
$txtz = "\x03" . $::RCOLOR{$::RISKS{$dct{$id}{risk}}} . "\u$dct{$id}{risk}\x03 risk threat [\x02$chan\x02] - ".
- "\x02$event->{nick}\x02 - ${nicereason}; ping ";
+ "\x02$nick\x02 - ${nicereason}; ping ";
$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");
+ my $uuid = $::log->incident($chan, "$chan: $dct{$id}{risk} risk: $nick - $nicereason\n");
$txtz = $txtz . ' ' . ASM::Shortener->shorturl($::settings->{web}->{detectdir} . $uuid . '.txt');
if ($id eq 'last_measure_regex') { #TODO: Note that this is another example of things that shouldn't be hardcoded, but are.