X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=calls.pl;fp=calls.pl;h=1f779d6244bf8d1cb3ad3538c1a5dc039018360f;hb=3fbdd3816ab065ed3ac2b5f77e7617b2c09ea00c;hp=c09b6067acdacf6b87bda1b9514f2d975ddb561e;hpb=409b542556545c6ebfc579ce114338242c966ceb;p=ndwebbie.git diff --git a/calls.pl b/calls.pl index c09b606..1f779d6 100644 --- a/calls.pl +++ b/calls.pl @@ -21,7 +21,6 @@ use strict; use warnings FATAL => 'all'; our $BODY; our $DBH; -our $LOG; my $error; $ND::TEMPLATE->param(TITLE => 'Defense Calls'); @@ -46,7 +45,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."

"; } @@ -55,7 +54,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."

"; } @@ -87,7 +86,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."

"; } @@ -101,7 +100,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."

"; }