command commands => {
help => q(commands <command> | Gives help about all available commands or lists all commands available in the current channel),
+ type => 'help',
}, class extends NDIRC::Command {
method execute ($c,$command) {
unless($command){
}
$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);
}
}
};
command say => {
help => q(.say target message | sends message to target),
- type => q(pm),
+ type => q(ircpm),
acl => q(irc_say),
}, class extends NDIRC::Command {
method execute ($c,$msg) {
command cmd => {
help => q(.cmd command args | run a given irc command),
- type => q(pm),
+ type => q(ircpm),
acl => q(irc_cmd),
}, class extends NDIRC::Command {
method execute ($c,$msg) {
}
};
+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;