]> ruin.nu Git - ndwebbie.git/blobdiff - lib/NDWeb/Controller/Members.pm
Adding coords and tick to intel messages
[ndwebbie.git] / lib / NDWeb / Controller / Members.pm
index a77ec1eaddf1e734323b9baf07b7134f28fa4725..81a1238c2cdb8c2d270b3ffe22530bb6dbe24b54 100644 (file)
@@ -265,7 +265,7 @@ sub postircrequest : Local {
 INSERT INTO irc_requests (uid,channel,message) VALUES($1,$2,$3)
                });
                $query->execute($c->user->id,$c->req->param('channel'),$c->req->param('message'));
-               system 'killall','-USR1', 'irssi';
+               system 'killall','-USR1', 'ndbot.pl';
 
                $c->flash(reply => "Msg sent to: ".$c->req->param('channel'));
                $c->res->redirect($c->uri_for('ircrequest'));
@@ -366,6 +366,11 @@ sub postintelmessage : Local {
                }
        }
 
+       my ($coords,$tick) = $c->model->selectrow_array(q{
+SELECT coords(x,y,z), tick() FROM current_planet_stats WHERE pid = $1
+               }, undef, $c->user->planet);
+
+       $c->req->param(message => "[i]Posted by $coords at tick $tick [/i]\n\n" . $c->req->param('message'));
        $c->forward('/forum/insertThread',[12]);
        $c->forward('/forum/insertPost',[$c->stash->{thread}]);
        $c->flash(intelmessage => 1);