our @ISA = qw/Exporter/;
-our @EXPORT = qw/setHostile setNick setAlly setChannel/;
-
-sub setHostile {
- my ($msg, $command) = @_;
- my ($x,$y,$z);
- if(defined $msg && $msg =~ /^(\d+)\D(\d+)\D(\d+)$/){
- $x = $1;
- $y = $2;
- $z = $3;
- }else{
- $ND::server->command("notice $ND::nick Usage: .$command X:Y:Z");
- return;
- }
- if(my $user = dc()){
- my $findid = $ND::DBH->prepare_cached(q{SELECT planetid(?,?,?,tick())});
- my ($id) = $ND::DBH->selectrow_array($findid,undef,$x,$y,$z);
- my $rv = $ND::DBH->do(q{UPDATE planets SET planet_status = 'Hostile' WHERE id = $1},undef,$id);
- if ($rv == 1){
- $ND::server->command("msg $ND::target $x:$y:$z is now marked s hostile");
- intel_log $user->{uid},$id,"Set planet_status to: 'Hostile'";
- }
- }
-}
+our @EXPORT = qw/setNick setAlly setChannel/;
sub setNick {
my ($msg, $command) = @_;