}
sub sendScan {
- my ($target,$msg) = @_;
- DB();
+ 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).$msg.chr(3)."4 (reply with /msg $ND::scanchan)");
- $ND::server->command("msg $ND::target ${ND::C}3$1 << $2");
+ $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");
}
}