From e87bcfdca632f83b62d7b53db92289fb7c2c3e8e Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 3 Jul 2008 15:27:40 +0200 Subject: markov plugin: don't raise if seed message doesn't have enough words --- data/rbot/plugins/markov.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/data/rbot/plugins/markov.rb b/data/rbot/plugins/markov.rb index 7bcf7b41..17446f6d 100644 --- a/data/rbot/plugins/markov.rb +++ b/data/rbot/plugins/markov.rb @@ -169,6 +169,7 @@ class MarkovPlugin < Plugin return unless should_talk word1, word2 = message.split(/\s+/) + return unless word1 and word2 line = generate_string(word1, word2) return unless line return if line == message -- cgit v1.2.3