From 12906a51f698aebe1c9a5e19b15555ebbbcc4368 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Tue, 3 Apr 2007 17:18:50 +0000 Subject: Relocate help strings to proper locations, add help for 'mode' command --- lib/rbot/core/basics.rb | 8 +++----- lib/rbot/core/config.rb | 33 ++++++++++++++++++++++----------- 2 files changed, 25 insertions(+), 16 deletions(-) (limited to 'lib/rbot') diff --git a/lib/rbot/core/basics.rb b/lib/rbot/core/basics.rb index 866f506a..a1720b7a 100644 --- a/lib/rbot/core/basics.rb +++ b/lib/rbot/core/basics.rb @@ -113,10 +113,6 @@ class BasicsModule < CoreBotModule return "part => part channel " when "hide" return "hide => part all channels" - when "save" - return "save => save current dynamic data and configuration" - when "rescan" - return "rescan => reload modules and static facts" when "nick" return "nick => attempt to change nick to " when "say" @@ -131,12 +127,14 @@ class BasicsModule < CoreBotModule return "version => describes software version" when "ping" return "ping => replies with a pong" + when "mode" + return "mode => set channel modes for on to " # when "botsnack" # return "botsnack => reward #{myself} for being good" # when "hello" # return "hello|hi|hey|yo [#{myself}] => greet the bot" else - return "#{name}: quit, restart, join, part, hide, save, rescan, nick, say, action, topic, quiet, talk, version, ping"#, botsnack, hello" + return "#{name}: quit, restart, join, part, hide, save, nick, say, action, topic, quiet, talk, version, ping, mode"#, botsnack, hello" end end end diff --git a/lib/rbot/core/config.rb b/lib/rbot/core/config.rb index a239e97d..9de7a861 100644 --- a/lib/rbot/core/config.rb +++ b/lib/rbot/core/config.rb @@ -176,25 +176,36 @@ class ConfigModule < CoreBotModule end def help(plugin, topic="") - case topic - when "list" + case plugin + when "config" + case topic + when "" + "config-related tasks: config topics, save, rescan" + when "list" "config list => list configuration modules, config list => list configuration keys for module " - when "get" + when "get" "config get => get configuration value for key " - when "unset" + when "unset" "reset key to the default" - when "set" + when "set" "config set => set configuration value for key to " - when "desc" + when "desc" "config desc => describe what key configures" - when "add" + when "add" "config add to => add value to key if is an array" - when "rm" + when "rm" "config rm from => remove value from key if is an array" - else + else "config module - bot configuration. usage: list, desc, get, set, unset, add, rm" - # else - # "no help for config #{topic}" + # else + # "no help for config #{topic}" + end + when "save" + "save => save current dynamic data and configuration" + when "rescan" + "rescan => reload modules and static facts" + else + "config-related tasks: config, save, rescan" end end -- cgit v1.2.3