X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;ds=inline;f=Commands%2FBasic.pm;h=672c7a9958c7a84940ca6bb420fb957260372f02;hb=refs%2Fheads%2Fnoeos;hp=1249f201586bc6155be184807f3ddee1697196bb;hpb=52aa24ac076b97096ff29e7a59331654620f230c;p=NDIRC.git
diff --git a/Commands/Basic.pm b/Commands/Basic.pm
index 1249f20..672c7a9 100644
--- a/Commands/Basic.pm
+++ b/Commands/Basic.pm
@@ -38,9 +38,7 @@ command commands => {
}
$c->reply(join ', ', @commands);
}elsif (exists $c->disp->commands->{$command}){
- for (@{$c->disp->commands->{$command}->help}){
- $c->reply($_);
- }
+ $c->reply($c->disp->commands->{$command}->help);
}
}
};
@@ -80,5 +78,20 @@ command cmd => {
}
};
+command anon => {
+ help => q(syntax: .anon nick message),
+ type => q(anon),
+ acl => q(irc_anon),
+}, class extends NDIRC::Command {
+ method execute($c,$msg) {
+ my ($target,$mess) = $msg =~ /^(\S+) (.*)$/ or die 'ARGS';
+
+ $c->message(privmsg => $target, "$mess (reply with /msg "
+ .$c->channel.")");
+ $c->message(privmsg => $c->channel, "$target << $mess");
+ }
+};
+
+
1;