diff --git a/plugins/Markov.py b/plugins/Markov.py index 19fd9ce36..368b46c91 100644 --- a/plugins/Markov.py +++ b/plugins/Markov.py @@ -131,6 +131,9 @@ class Markov(callbacks.Privmsg, ChannelDBHandler): WHERE is_first=1 ORDER BY random() LIMIT 1""") + if cursor.rowcount == 0: + irc.error(msg, 'I have no records for that channel.') + return (id, first, second) = cursor.fetchone() id = int(id) words.append(first)