diff options
Diffstat (limited to 'config-default')
| -rw-r--r-- | config-default/commands.xml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/config-default/commands.xml b/config-default/commands.xml index 9f1f9b5..97b5d70 100644 --- a/config-default/commands.xml +++ b/config-default/commands.xml @@ -185,6 +185,18 @@ $conn->privmsg($event->replyto, "Please refer to http://antispammeta.net and irc.freenode.net #antispammeta"); ]]> </command> + <command cmd="^;help (?<cmd>\S+)$"> + <![CDATA[ + my @cmds = grep { $_->{cmd} =~ /$+{cmd}/} @{$::commands->{command}}; + if ((scalar @cmds) > 2) { + $conn->privmsg($event->replyto, "Please refer to http://antispammeta.net and irc.freenode.net #antispammeta"); + } else { + foreach my $cmd (@cmds) { + $conn->privmsg($event->replyto, ($cmd->{flag} // ' ') . ' ' . $cmd->{cmd}) + } + } + ]]> + </command> <command cmd="^;db$"> <