#**************************************************************************
-# 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 *
. "($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;
our @ISA = qw/Exporter/;
-our @EXPORT = qw/addScan addScanGroup sendScan/;
+our @EXPORT = qw/addScan addScanGroup/;
sub addScan {
my ($id,$verbose) = @_;
}
}
-sub sendScan {
- my ($msg, $command) = @_;
- my ($target,$mess);
- if (defined $msg && $msg =~ /^(\S+) (.*)$/){
- $target = $1;
- $mess = $2;
- }else{
- $ND::server->command("notice $ND::nick syntax: $command nick message");
- return;
- }
- if (scanner()){
- $ND::server->command("msg $target ".chr(2).$mess.chr(3)."4 (reply with /msg $ND::scanchan)");
- $ND::server->command("msg $ND::target ${ND::C}3$target << $mess");
- }
-}
INSERT INTO roles VALUES('irc_gs');
INSERT INTO roles VALUES('irc_scanreqs');
INSERT INTO roles VALUES('irc_scan');
+INSERT INTO roles VALUES('irc_anonscan');
INSERT INTO group_roles (gid,role) VALUES(1,'irc_p_nick');
INSERT INTO group_roles (gid,role) VALUES(1,'irc_p_intel');
INSERT INTO group_roles (gid,role) VALUES(1,'irc_masterop');
INSERT INTO group_roles (gid,role) VALUES(1,'irc_masterinvite');
INSERT INTO group_roles (gid,role) VALUES(1,'irc_scanreqs');
+INSERT INTO group_roles (gid,role) VALUES(1,'irc_anonscan');
INSERT INTO group_roles (gid,role) VALUES(2,'irc_gs');
INSERT INTO group_roles (gid,role) VALUES(2,'irc_scan');
INSERT INTO group_roles (gid,role) VALUES(3,'irc_masterop');
INSERT INTO group_roles (gid,role) VALUES(3,'irc_masterinvite');
INSERT INTO group_roles (gid,role) VALUES(3,'irc_scanreqs');
+INSERT INTO group_roles (gid,role) VALUES(3,'irc_anonscan');
+
INSERT INTO group_roles (gid,role) VALUES(5,'irc_p_nick');
INSERT INTO group_roles (gid,role) VALUES(5,'irc_p_intel');
INSERT INTO group_roles (gid,role) VALUES(6,'irc_p_intel');
INSERT INTO group_roles (gid,role) VALUES(8,'irc_scanreqs');
+INSERT INTO group_roles (gid,role) VALUES(8,'irc_anonscan');
INSERT INTO group_roles (gid,role) VALUES(18,'irc_p_nick');
INSERT INTO group_roles (gid,role) VALUES(18,'irc_p_intel');
#**************************************************************************
-# 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 *
my ($server, $msg, $nick, $address, $channel) = @_;
eval {
+ if ($msg =~ /^(\S+): (.+)$/ && $disp->has_command('anon',$channel)){
+ my $_ = $1;
+ my $text = $2;
+ my $channel = $server->channel_find($channel);
+ my $nick = $channel->nick_find($1);
+ unless ($nick || /(Constructing|Researching)/){
+ print ".anon $_ $text";
+ $msg = ".anon $_ $text";
+ }
+
+ }
if (parseCommand($msg,$server,$nick,$address,$channel,$disp,DB())){
#Command parsed and run successfully
}