summaryrefslogtreecommitdiffstats
path: root/lib/ASM/Inspect.pm
diff options
context:
space:
mode:
authorLibravatarJanik Kleinhoff <ilbelkyr@shalture.org>2016-10-28 13:48:16 +0000
committerLibravatarJanik Kleinhoff <ilbelkyr@shalture.org>2016-10-28 14:12:19 +0000
commit3dda2775b73b29ca72f3996eb5788124950f9e70 (patch)
tree0a02aeffbfee3392c1d38e79338291cfea7cd771 /lib/ASM/Inspect.pm
parent546df459147cf5842724d88428794eaf296cb879 (diff)
Use DBIx::Class
For now this is a relatively quick-and-dirty transition, but this enables us to reuse ASM::DB from the website. Yay
Diffstat (limited to 'lib/ASM/Inspect.pm')
-rw-r--r--lib/ASM/Inspect.pm5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/ASM/Inspect.pm b/lib/ASM/Inspect.pm
index d85d10d..d6121fb 100644
--- a/lib/ASM/Inspect.pm
+++ b/lib/ASM/Inspect.pm
@@ -125,14 +125,11 @@ sub inspect {
return unless (ASM::Util->notRestricted($nick, "notrigger") && ASM::Util->notRestricted($nick, "no$id"));
$xresult = $dct{$id}{xresult};
my $nicereason = interpolate($dct{$id}{reason});
- if (defined $::db) {
- $::db->record($chan, $displaynick, $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$displaynick\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: $displaynick - $nicereason\n");
+ my $uuid = $::log->incident($chan, $displaynick, $event->{user}, $event->{host}, $::sn{lc $nick}->{gecos}, $dct{$id}{risk}, $id, $nicereason);
$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.