diff options
author | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-08-12 19:17:08 +0000 |
---|---|---|
committer | Tom Gilbert <tom@linuxbrit.co.uk> | 2005-08-12 19:17:08 +0000 |
commit | f6cd49278021305198e5ec7f9060d2410a3a661d (patch) | |
tree | 52974baa4f061be7aba4cc42bdcda19ac1c3ab7a | |
parent | a3b26a1e24c8111d997397a42f59519773410cf6 (diff) |
oops, mustn't override cleanup
-rw-r--r-- | data/rbot/plugins/markov.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/data/rbot/plugins/markov.rb b/data/rbot/plugins/markov.rb index a737f028..1155b207 100644 --- a/data/rbot/plugins/markov.rb +++ b/data/rbot/plugins/markov.rb @@ -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 |