summaryrefslogtreecommitdiffstats
path: root/lib/ASM/Log.pm
diff options
context:
space:
mode:
authorLibravatarJanik Kleinhoff <ilbelkyr@shalture.org>2016-10-29 00:19:48 +0000
committerLibravatarJanik Kleinhoff <ilbelkyr@shalture.org>2016-10-29 00:19:48 +0000
commitef2cd8fdb38de61963c76398e1be457d59afdbc1 (patch)
tree3f355b4f31294235fe2d1b78ac942636430f3aa0 /lib/ASM/Log.pm
parent3dda2775b73b29ca72f3996eb5788124950f9e70 (diff)
fix !ops with new DB interface
Diffstat (limited to 'lib/ASM/Log.pm')
-rw-r--r--lib/ASM/Log.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/ASM/Log.pm b/lib/ASM/Log.pm
index e9a6d6f..319ea40 100644
--- a/lib/ASM/Log.pm
+++ b/lib/ASM/Log.pm
@@ -144,7 +144,15 @@ sub incident
$chan = lc $chan;
my $uuid = $self->{UUID}->create_str();
- my $header = "$chan: $risk risk: $nick - $reason\n";
+ my $is_opalert = ($risk eq 'opalert');
+
+ my $header;
+ if ($is_opalert) {
+ $header = "$chan: $nick requested op attention\n";
+ }
+ else {
+ $header = "$chan: $risk risk: $nick - $reason\n";
+ }
open(FH, '>', $self->{CONFIG}->{detectdir} . $uuid . '.txt');
print FH $header;
@@ -154,6 +162,8 @@ sub incident
print FH "\n\n";
close(FH);
+ return if $is_opalert;
+
$gecos //= "NOT_DEFINED";
$::db->resultset('Alertlog')->create({