summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/markov.rb
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-07-03 15:27:40 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-07-03 15:27:40 +0200
commite87bcfdca632f83b62d7b53db92289fb7c2c3e8e (patch)
tree11628087470b2ecbd5844681682b6e6ed88ea690 /data/rbot/plugins/markov.rb
parent21d544c8fe764881ce324cf2e5aa6ec6e12dbbdb (diff)
markov plugin: don't raise if seed message doesn't have enough words
Diffstat (limited to 'data/rbot/plugins/markov.rb')
-rw-r--r--data/rbot/plugins/markov.rb1
1 files changed, 1 insertions, 0 deletions
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