diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-07-03 15:27:40 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-07-03 15:27:40 +0200 |
commit | e87bcfdca632f83b62d7b53db92289fb7c2c3e8e (patch) | |
tree | 11628087470b2ecbd5844681682b6e6ed88ea690 | |
parent | 21d544c8fe764881ce324cf2e5aa6ec6e12dbbdb (diff) |
markov plugin: don't raise if seed message doesn't have enough words
-rw-r--r-- | data/rbot/plugins/markov.rb | 1 |
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 |