]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
oops, mustn't override cleanup
authorTom Gilbert <tom@linuxbrit.co.uk>
Fri, 12 Aug 2005 19:17:08 +0000 (19:17 +0000)
committerTom Gilbert <tom@linuxbrit.co.uk>
Fri, 12 Aug 2005 19:17:08 +0000 (19:17 +0000)
data/rbot/plugins/markov.rb

index a737f02893d0559b52458896e9230de60ae019e4..1155b207f79e57a50b1e01e1fa2d31cb01d09e18 100644 (file)
@@ -24,7 +24,7 @@ class MarkovPlugin < Plugin
     "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."
   end
   
-  def cleanup(s)
+  def clean_str(s)
     str = s.dup
     str.gsub!(/^.+:/, "")
     str.gsub!(/^.+,/, "")
@@ -34,7 +34,7 @@ class MarkovPlugin < Plugin
   def listen(m)
     return unless m.kind_of?(PrivMessage) && m.public?
     return if m.address?
-    message = cleanup m.message
+    message = clean_str m.message
     # in channel message, the kind we are interested in
     wordlist = message.split(/\s+/)
     return unless wordlist.length > 2