]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
Relocate help strings to proper locations, add help for 'mode' command
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Tue, 3 Apr 2007 17:18:50 +0000 (17:18 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Tue, 3 Apr 2007 17:18:50 +0000 (17:18 +0000)
lib/rbot/core/basics.rb
lib/rbot/core/config.rb

index 866f506af49e82ca569192886cd5bdb39321ca97..a1720b7afcd52a03ce7669b23ee6d3f1f8eaca1f 100644 (file)
@@ -113,10 +113,6 @@ class BasicsModule < CoreBotModule
       return "part <channel> => part channel <channel>"\r
     when "hide"\r
       return "hide => part all channels"\r
-    when "save"\r
-      return "save => save current dynamic data and configuration"\r
-    when "rescan"\r
-      return "rescan => reload modules and static facts"\r
     when "nick"\r
       return "nick <nick> => attempt to change nick to <nick>"\r
     when "say"\r
@@ -131,12 +127,14 @@ class BasicsModule < CoreBotModule
       return "version => describes software version"\r
     when "ping"\r
       return "ping => replies with a pong"\r
+    when "mode"\r
+      return "mode <channel> <mode> <nicks> => set channel modes for <nicks> on <channel> to <mode>"\r
     #     when "botsnack"\r
     #       return "botsnack => reward #{myself} for being good"\r
     #     when "hello"\r
     #       return "hello|hi|hey|yo [#{myself}] => greet the bot"\r
     else\r
-      return "#{name}: quit, restart, join, part, hide, save, rescan, nick, say, action, topic, quiet, talk, version, ping"#, botsnack, hello"\r
+      return "#{name}: quit, restart, join, part, hide, save, nick, say, action, topic, quiet, talk, version, ping, mode"#, botsnack, hello"\r
     end\r
   end\r
 end\r
index a239e97dfe107ac03abb73f18d6021796d4c6498..9de7a8613e81bb2455fb384c8a38560ed5907ff7 100644 (file)
@@ -176,25 +176,36 @@ class ConfigModule < CoreBotModule
   end\r
 \r
   def help(plugin, topic="")\r
-    case topic\r
-    when "list"\r
+    case plugin\r
+    when "config"\r
+      case topic\r
+      when ""\r
+      "config-related tasks: config topics, save, rescan"\r
+      when "list"\r
       "config list => list configuration modules, config list <module> => list configuration keys for module <module>"\r
-    when "get"\r
+      when "get"\r
       "config get <key> => get configuration value for key <key>"\r
-    when "unset"\r
+      when "unset"\r
       "reset key <key> to the default"\r
-    when "set"\r
+      when "set"\r
       "config set <key> <value> => set configuration value for key <key> to <value>"\r
-    when "desc"\r
+      when "desc"\r
       "config desc <key> => describe what key <key> configures"\r
-    when "add"\r
+      when "add"\r
       "config add <value> to <key> => add value <value> to key <key> if <key> is an array"\r
-    when "rm"\r
+      when "rm"\r
       "config rm <value> from <key> => remove value <value> from key <key> if <key> is an array"\r
-    else\r
+      else\r
       "config module - bot configuration. usage: list, desc, get, set, unset, add, rm"\r
-    # else\r
-    #   "no help for config #{topic}"\r
+      # else\r
+      #   "no help for config #{topic}"\r
+      end\r
+    when "save"\r
+      "save => save current dynamic data and configuration"\r
+    when "rescan"\r
+      "rescan => reload modules and static facts"\r
+    else\r
+      "config-related tasks: config, save, rescan"\r
     end\r
   end\r
 \r