- def help(plugin, topic="")
- case topic
- when "overview"
- return "set: <keyword> is <definition>, overide: no, <keyword> is <definition>, add to definition: <keyword> is also <definition>, random responses: <keyword> is <definition> | <definition> [| ...], plurals: <keyword> are <definition>, escaping: \\is, \\are, \\|, specials: <reply>, <action>, <who>"
- when "set"
- return "set => <keyword> is <definition>"
- when "plurals"
- return "plurals => <keywords> are <definition>"
- when "override"
- return "overide => no, <keyword> is <definition>"
- when "also"
- return "also => <keyword> is also <definition>"
- when "random"
- return "random responses => <keyword> is <definition> | <definition> [| ...]"
- when "get"
- return "asking for keywords => (with addressing) \"<keyword>?\", (without addressing) \"'<keyword>\""
- when "tell"
- return "tell <nick> about <keyword> => if <keyword> is known, tell <nick>, via /msg, its definition"
- when "forget"
- return "forget <keyword> => forget fact <keyword>"
- when "keywords"
- return "keywords => show current keyword counts"
- when "<reply>"
- return "<reply> => normal response is \"<keyword> is <definition>\", but if <definition> begins with <reply>, the response will be \"<definition>\""
- when "<action>"
- return "<action> => makes keyword respnse \"/me <definition>\""
- when "<who>"
- return "<who> => replaced with questioner in reply"
- when "<topic>"
- return "<topic> => respond by setting the topic to the rest of the definition"
- when "search"
- return "keyword search [--all] [--full] <regexp> => search keywords for <regexp>. If --all is set, search static keywords too, if --full is set, search definitions too."
+ def help(plugin, topic = '')
+ case plugin
+ when /keyword/
+ case topic
+ when 'lookup'
+ 'keyword [lookup] <keyword> => look up the definition for a keyword; writing "lookup" is optional'
+ when 'set'
+ 'keyword set <keyword> is/are <definition> => define a keyword, definition can contain "|" to separate multiple randomly chosen replies'
+ when 'forget'
+ 'keyword forget <keyword> => forget a keyword'
+ when 'tell'
+ 'keyword tell <nick> about <keyword> => tell somebody about a keyword'
+ when 'search'
+ 'keyword search [--all] [--full] <pattern> => search keywords for <pattern>, which can be a regular expression. If --all is set, search static keywords too, if --full is set, search definitions too.'
+ when 'listen'
+ 'when the config option "keyword.listen" is set to false, rbot will try to extract keyword definitions from regular channel messages'
+ when 'address'
+ 'when the config option "keyword.address" is set to true, rbot will try to answer channel questions of the form "<keyword>?"'
+ when '<reply>'
+ '<reply> => normal response is "<keyword> is <definition>", but if <definition> begins with <reply>, the response will be "<definition>"'
+ when '<action>'
+ '<action> => makes keyword respond with "/me <definition>"'
+ when '<who>'
+ '<who> => replaced with questioner in reply'
+ when '<topic>'
+ '<topic> => respond by setting the topic to the rest of the definition'