diff --git a/plugins/Markov.py b/plugins/Markov.py index efbae9d26..5bec6db56 100644 --- a/plugins/Markov.py +++ b/plugins/Markov.py @@ -170,7 +170,7 @@ class Markov(callbacks.Privmsg, ChannelDBHandler): def markovfirsts(self, irc, msg, args): """[] - Returns the number of Markov's chain links in the database for + Returns the number of Markov's first links in the database for . """ channel = privmsgs.getChannel(msg, args) @@ -195,6 +195,20 @@ class Markov(callbacks.Privmsg, ChannelDBHandler): s = 'There are %s follows in my Markov database for %s' % (n, channel) irc.reply(msg, s) + def markovlasts(self, irc, msg, args): + """[] + + Returns the number of Markov's last links in the database for + . + """ + channel = privmsgs.getChannel(msg, args) + db = self.getDb(channel) + cursor = db.cursor() + cursor.execute("""SELECT COUNT(*) FROM follows WHERE word=NULL""") + n = cursor.fetchone()[0] + s = 'There are %s follows in my Markov database for %s' % (n, channel) + irc.reply(msg, s) + Class = Markov