diff options
| author | 2016-01-21 16:46:34 -0700 | |
|---|---|---|
| committer | 2016-01-21 16:46:34 -0700 | |
| commit | a73ccb8276861dab3fcba34c2783122655947844 (patch) | |
| tree | 1823287054c36c65de0f43963a180788d082570c /lib/ASM/Commander.pm | |
| parent | 939891b050a6c0c5f44acf6ef43a30ee76719a16 (diff) | |
Have the Inspect/opalert routines print a backlog to an incident-specific logfile, rather than a single file, and include a shortlink to this logfile when generating alerts
Diffstat (limited to 'lib/ASM/Commander.pm')
| -rw-r--r-- | lib/ASM/Commander.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ASM/Commander.pm b/lib/ASM/Commander.pm index 6d194d2..0098d32 100644 --- a/lib/ASM/Commander.pm +++ b/lib/ASM/Commander.pm @@ -7,6 +7,8 @@ use IO::All; use POSIX qw(strftime); use Data::Dumper; use URI::Escape; +use ASM::Shortener; + no if $] >= 5.017011, warnings => 'experimental::smartmatch'; my $cmdtbl = { @@ -880,9 +882,10 @@ sub cmd_ops { if ((time-$::sc{$tgt}{users}{lc $event->{nick}}{jointime}) > 90) { $txtz .= " ($msg) $hilite !att-$tgt-opalert"; } + my $uuid = $::log->incident($tgt, "$tgt: $event->{nick} requested op attention\n"); + $txtz = $txtz . ' ' . ASM::Shortener->shorturl($::settings->{web}->{detectdir} . $uuid . '.txt'); my @tgts = ASM::Util->getAlert($tgt, 'opalert', 'msgs'); ASM::Util->sendLongMsg($conn, \@tgts, $txtz); - $::log->incident($tgt, "$tgt: $event->{nick} requested op attention\n"); } else { unless (defined($::ignored{$tgt}) && ($::ignored{$tgt} >= $::RISKS{'opalert'})) { my @tgts = ASM::Util->getAlert($tgt, 'opalert', 'msgs'); |
