diff options
| author | 2016-10-29 00:19:48 +0000 | |
|---|---|---|
| committer | 2016-10-29 00:19:48 +0000 | |
| commit | ef2cd8fdb38de61963c76398e1be457d59afdbc1 (patch) | |
| tree | 3f355b4f31294235fe2d1b78ac942636430f3aa0 /lib/ASM/Log.pm | |
| parent | 3dda2775b73b29ca72f3996eb5788124950f9e70 (diff) | |
fix !ops with new DB interface
Diffstat (limited to 'lib/ASM/Log.pm')
| -rw-r--r-- | lib/ASM/Log.pm | 12 |
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({ |
