From f6cd49278021305198e5ec7f9060d2410a3a661d Mon Sep 17 00:00:00 2001 From: Tom Gilbert Date: Fri, 12 Aug 2005 19:17:08 +0000 Subject: oops, mustn't override cleanup --- data/rbot/plugins/markov.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'data/rbot/plugins/markov.rb') 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 -- cgit v1.2.3