diff options
| author | 2016-01-13 06:28:53 -0700 | |
|---|---|---|
| committer | 2016-01-13 06:28:53 -0700 | |
| commit | 72b7233de5891316a00fe4ff0d94c5dc15fd5ead (patch) | |
| tree | eb8d7d9bc93842fc2382c614b58f50c18fec1c37 /config-default/commands.xml | |
| parent | e174e44b0b4545abfc489a2ad321ad18354eef95 (diff) | |
Add a marginally better help function, e.g. ;help ;hilight
Diffstat (limited to 'config-default/commands.xml')
| -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$"> <