]> ruin.nu Git - NDIRC.git/blobdiff - Commands/Scans.pm
Converted sendScan and called it anon for scanners too
[NDIRC.git] / Commands / Scans.pm
index 1f5f347272b405baf7e579747b1888de081adab2..2747acbb2abc5700770692bbe35c42f3acba48a3 100644 (file)
@@ -1,5 +1,5 @@
 #**************************************************************************
-#   Copyright (C) 2008 by Michael Andreen <harvATruinDOTnu>               *
+#   Copyright (C) 2009 by Michael Andreen <harvATruinDOTnu>               *
 #                                                                         *
 #   This program is free software; you can redistribute it and/or modify  *
 #   it under the terms of the GNU General Public License as published by  *
@@ -186,4 +186,16 @@ SELECT ship,amount FROM fleet_ships WHERE fid = $1 ORDER BY num
                . "($scan->{scan_id} pt: <b>$scan->{tick}</b>): $text");
 }
 
+sub anon
+       : Help(syntax: .anon nick message)
+       : Type(scan)
+       : ACL(irc_anonscan)
+{
+       my ($self, $c, $msg) = @_;
+       my ($target,$mess) = $msg =~ /^(\S+) (.*)$/ or die 'ARGS';
+
+       $c->message("msg $target", "<b>$mess</b> <c04>(reply with /msg $ND::scanchan)</c>");
+       $c->message("msg $ND::scanchan", "<c03>$target << $mess</c>");
+}
+
 1;