]> ruin.nu Git - ndwebbie.git/blobdiff - intel.pl
make whole cell clickable
[ndwebbie.git] / intel.pl
index ba63838ebc0588993f5a0bf1acb387ffcdcd332f..e538411cf8796856fe395e221e13a65fe0d18757 100644 (file)
--- a/intel.pl
+++ b/intel.pl
 
 use strict;
 use warnings FATAL => 'all';
-use ND::Forum;
+use ND::Web::Forum;
+use ND::Include;
 
 our $BODY;
 our $DBH;
-our $LOG;
 our $ERROR;
 my $error;
 
@@ -86,6 +86,7 @@ if ($planet && defined param('cmd')){
                        my $value = escapeHTML(param('nick'));
                        if ($DBH->do(q{UPDATE planets SET nick = ? WHERE id =?}
                                        ,undef,$value,$planet->{id})){
+                               intel_log $ND::UID,$planet->{id},"Set nick to: $value";
                                $planet->{nick} = $value;
                        }else{
                                $error .= "<p> Something went wrong: ".$DBH->errstr."</p>";
@@ -95,6 +96,7 @@ if ($planet && defined param('cmd')){
                        my $value = escapeHTML(param('channel'));
                        if ($DBH->do(q{UPDATE planets SET channel = ? WHERE id =?}
                                        ,undef,$value,$planet->{id})){
+                               intel_log $ND::UID,$planet->{id},"Set channel to: $value";
                                $planet->{channel} = $value;
                        }else{
                                $error .= "<p> Something went wrong: ".$DBH->errstr."</p>";
@@ -104,6 +106,7 @@ if ($planet && defined param('cmd')){
                        my $value = escapeHTML(param('status'));
                        if ($DBH->do(q{UPDATE planets SET planet_status = ? WHERE id =?}
                                        ,undef,$value,$planet->{id})){
+                               intel_log $ND::UID,$planet->{id},"Set planet_status to: $value";
                                $planet->{planet_status} = $value;
                        }else{
                                $error .= "<p> Something went wrong: ".$DBH->errstr."</p>";
@@ -112,6 +115,7 @@ if ($planet && defined param('cmd')){
                if (param('calliance')){
                        if ($DBH->do(q{UPDATE planets SET alliance_id = NULLIF(?,-1) WHERE id =?}
                                        ,undef,param('alliance'),$planet->{id})){
+                               intel_log $ND::UID,$planet->{id},"Set alliance_id to: ".param('alliance');
                                $planet->{alliance_id} = param('alliance');
                        }else{
                                $error .= "<p> Something went wrong: ".$DBH->errstr."</p>";