X-Git-Url: https://ruin.nu/git/?p=NDIRC.git;a=blobdiff_plain;f=Commands%2FBasic.pm;h=fd30f0f728ec4b5aad9302e591166eadd6073211;hp=f0404876f1bba0e4a08093a054b3bf320ba719a0;hb=bab20f6b99ddd4d7bdcab215ae75386c5bd40564;hpb=784ed86eacf5ebed4d3da2ff166b7542ac8f5cd0 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;