summaryrefslogtreecommitdiff
path: root/lib/rbot/core
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-04-03 17:18:50 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-04-03 17:18:50 +0000
commit12906a51f698aebe1c9a5e19b15555ebbbcc4368 (patch)
tree5e8cd21e79a2ef53fbb6f79196ee5455934c057d /lib/rbot/core
parent4258907bfce64f40ca384b6532e47f30615da15b (diff)
Relocate help strings to proper locations, add help for 'mode' command
Diffstat (limited to 'lib/rbot/core')
-rw-r--r--lib/rbot/core/basics.rb8
-rw-r--r--lib/rbot/core/config.rb33
2 files changed, 25 insertions, 16 deletions
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 <channel> => part channel <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 <nick> => attempt to change nick to <nick>"
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 <channel> <mode> <nicks> => set channel modes for <nicks> on <channel> to <mode>"
# 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 <module> => list configuration keys for module <module>"
- when "get"
+ when "get"
"config get <key> => get configuration value for key <key>"
- when "unset"
+ when "unset"
"reset key <key> to the default"
- when "set"
+ when "set"
"config set <key> <value> => set configuration value for key <key> to <value>"
- when "desc"
+ when "desc"
"config desc <key> => describe what key <key> configures"
- when "add"
+ when "add"
"config add <value> to <key> => add value <value> to key <key> if <key> is an array"
- when "rm"
+ when "rm"
"config rm <value> from <key> => remove value <value> from key <key> if <key> 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