]> ruin.nu Git - NDIRC.git/blobdiff - Commands/Basic.pm
Help texts are only a single string now
[NDIRC.git] / Commands / Basic.pm
index 1249f201586bc6155be184807f3ddee1697196bb..672c7a9958c7a84940ca6bb420fb957260372f02 100644 (file)
@@ -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, "<b>$mess</b> <c04>(reply with /msg "
+                       .$c->channel.")</c>");
+               $c->message(privmsg => $c->channel, "<c03>$target << $mess</c>");
+       }
+};
+
+
 1;