]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
markov: organize help
authorRaine Virta <rane@kapsi.fi>
Tue, 24 Feb 2009 21:12:16 +0000 (23:12 +0200)
committerRaine Virta <rane@kapsi.fi>
Wed, 25 Feb 2009 23:14:03 +0000 (01:14 +0200)
data/rbot/plugins/markov.rb

index 22981f683a6b4f2bb62c3247fb7f092dd5facbb8..deeb9cae4cb3bdbdf0b67d306b7a9729bbefa3c6 100755 (executable)
@@ -111,7 +111,34 @@ class MarkovPlugin < Plugin
   end
 
   def help(plugin, topic="")
-    _("markov plugin: listens to chat to build a markov chain, with which it can (perhaps) attempt to (inanely) contribute to 'discussion'. Sort of.. Will get a *lot* better after listening to a lot of chat. usage: 'markov' to attempt to say something relevant to the last line of chat, if it can.  other options to markov: 'ignore' => ignore a hostmask (accept no input), 'status' => show current status, 'probability [<chance>]' => set the % chance of rbot responding to input, or display the current probability, 'chat' => try and say something intelligent, 'chat about <foo> <bar>' => riff on a word pair (if possible)")
+    topic, subtopic = topic.split
+
+    case topic
+    when "ignore"
+      case subtopic
+      when "add"
+        "markov ignore add <hostmask|channel> => ignore a hostmask or a channel"
+      when "list"
+        "markov ignore list => show ignored hostmasks and channels"
+      when "remove"
+        "markov ignore remove <hostmask|channel> => unignore a hostmask or channel"
+      else
+        "ignore hostmasks or channels -- topics: add, remove, list"
+      end
+    when "status"
+      "markov status => show if markov is enabled, probability and amount of messages in queue for learning"
+    when "probability"
+      "markov probability [<percent>] => set the % chance of rbot responding to input, or display the current probability"
+    when "chat"
+      case subtopic
+      when "about"
+        "markov chat about <word> [<another word>] => talk about <word> or riff on a word pair (if possible)"
+      else
+        "markov chat => try to say something intelligent"
+      end
+    else
+      "markov plugin: listens to chat to build a markov chain, with which it can (perhaps) attempt to (inanely) contribute to 'discussion'. Sort of.. Will get a *lot* better after listening to a lot of chat. Usage: 'chat' to attempt to say something relevant to the last line of chat, if it can -- help topics: ignore, status, probability, chat, chat about"
+    end
   end
 
   def clean_str(s)