summaryrefslogtreecommitdiffstats
path: root/lib/ASM/Commander.pm
diff options
context:
space:
mode:
authorLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2016-01-21 16:46:34 -0700
committerLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2016-01-21 16:46:34 -0700
commita73ccb8276861dab3fcba34c2783122655947844 (patch)
tree1823287054c36c65de0f43963a180788d082570c /lib/ASM/Commander.pm
parent939891b050a6c0c5f44acf6ef43a30ee76719a16 (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.pm5
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');