X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=calls.pl;h=342f47d080e8bfc39299f2760faf24ce6491393a;hb=bea9ca01144b2ecfdd1fb0f7efc7b21f170da8c3;hp=159892c2d0bd99cdfa7e2b411dfb62aaf0b9cc58;hpb=d19bfd06cfbd72cfd09c0c2ace0142d9ee5be468;p=ndwebbie.git diff --git a/calls.pl b/calls.pl index 159892c..342f47d 100644 --- a/calls.pl +++ b/calls.pl @@ -19,10 +19,9 @@ use strict; use warnings FATAL => 'all'; -use POSIX; +use ND::Include; our $BODY; our $DBH; -our $LOG; my $error; $ND::TEMPLATE->param(TITLE => 'Defense Calls'); @@ -47,7 +46,7 @@ if ($call && defined param('cmd')){ if ($DBH->do(q{UPDATE calls SET landing_tick = ? WHERE id = ?} ,undef,param('tick'),$call->{id})){ $call->{landing_tick} = param('tick'); - $LOG->execute($ND::UID,"DC updated landing tick for call $call->{id}"); + log_message $ND::UID,"DC updated landing tick for call $call->{id}"; }else{ $error .= "

Something went wrong: ".$DBH->errstr."

"; } @@ -56,7 +55,7 @@ if ($call && defined param('cmd')){ if ($DBH->do(q{UPDATE calls SET info = ? WHERE id = ?} ,undef,param('info'),$call->{id})){ $call->{info} = param('info'); - $LOG->execute($ND::UID,"DC updated info for call $call->{id}"); + log_message $ND::UID,"DC updated info for call $call->{id}"; }else{ $error .= "

Something went wrong: ".$DBH->errstr."

"; } @@ -88,7 +87,7 @@ if ($call && defined param('cmd')){ for my $param (param()){ if ($param =~ /^change:(\d+)$/){ if($query->execute($1,$call->{id})){ - $LOG->execute($ND::UID,"DC deleted fleet: $1, call $call->{id}"); + log_message $ND::UID,"DC deleted fleet: $1, call $call->{id}"; }else{ $error .= "

Something went wrong: ".$DBH->errstr."

"; } @@ -102,7 +101,7 @@ if ($call && defined param('cmd')){ if ($param =~ /^change:(\d+)$/){ my $shiptype = escapeHTML(param("shiptype:$1")); if($query->execute($shiptype,$1,$call->{id})){ - $LOG->execute($ND::UID,"DC set fleet: $1, call $call->{id} to: $shiptype"); + log_message $ND::UID,"DC set fleet: $1, call $call->{id} to: $shiptype"; }else{ $error .= "

Something went wrong: ".$DBH->errstr."

"; }