X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=Commands%2FBasic.pm;h=fd30f0f728ec4b5aad9302e591166eadd6073211;hb=06eb99af20cebc85b1f609becb125b4dc32bf8ff;hp=f0404876f1bba0e4a08093a054b3bf320ba719a0;hpb=4f1948e0fe10075464732db5cc2168207c00c7aa;p=NDIRC.git diff --git a/Commands/Basic.pm b/Commands/Basic.pm index f040487..fd30f0f 100644 --- a/Commands/Basic.pm +++ b/Commands/Basic.pm @@ -59,5 +59,26 @@ sub help . "Instead of . you can use ! to get reply in pm or ~ to get reply in channel."); } +sub say + : Help(.say target message | sends message to target) + : Type(pm) + : ACL(irc_say) +{ + my ($self, $c, $msg) = @_; + my ($target,$message) = $msg =~ /^(\S+)\s+(.+)$/ or die 'ARGS'; + + $c->message(privmsg => $target => $message ); +} + +sub cmd + : Help(.run command args | run a given command) + : Type(pm) + : ACL(irc_cmd) +{ + my ($self, $c, $msg) = @_; + + $c->command(split /\s/, $msg); +} + 1;