From 3dda2775b73b29ca72f3996eb5788124950f9e70 Mon Sep 17 00:00:00 2001 From: Janik Kleinhoff Date: Fri, 28 Oct 2016 13:48:16 +0000 Subject: 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 --- lib/ASM/Inspect.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib/ASM/Inspect.pm') 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. -- cgit v1.2.3