summaryrefslogtreecommitdiffstats
path: root/config-default
diff options
context:
space:
mode:
authorLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2016-01-13 06:28:53 -0700
committerLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2016-01-13 06:28:53 -0700
commit72b7233de5891316a00fe4ff0d94c5dc15fd5ead (patch)
treeeb8d7d9bc93842fc2382c614b58f50c18fec1c37 /config-default
parente174e44b0b4545abfc489a2ad321ad18354eef95 (diff)
Add a marginally better help function, e.g. ;help ;hilight
Diffstat (limited to 'config-default')
-rw-r--r--config-default/commands.xml12
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 (?&lt;cmd&gt;\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$">
<![CDATA[
$conn->privmsg($event->replyto, "db is at http://antispammeta.net/query.html");