Added some debugging printfs that may be useful in the future.

This commit is contained in:
Jeremy Fincher 2003-11-22 00:40:46 +00:00
parent 7b26501f15
commit 6b5ef88c06

View File

@ -89,6 +89,7 @@ class Markov(plugins.ChannelDBHandler, callbacks.Privmsg):
return
channel = msg.args[0]
db = self.getDb(channel)
#debug.printf([channel, db.db.filename])
cursor = db.cursor()
if ircmsgs.isAction(msg):
words = ircmsgs.unAction(msg).split()
@ -129,6 +130,7 @@ class Markov(plugins.ChannelDBHandler, callbacks.Privmsg):
"""
channel = privmsgs.getChannel(msg, args)
db = self.getDb(channel)
#debug.printf([channel, db.db.filename])
cursor = db.cursor()
words = []
cursor.execute("""SELECT id, first, second FROM pairs
@ -170,6 +172,7 @@ class Markov(plugins.ChannelDBHandler, callbacks.Privmsg):
"""
channel = privmsgs.getChannel(msg, args)
db = self.getDb(channel)
#debug.printf([channel, db.db.filename])
cursor = db.cursor()
cursor.execute("""SELECT COUNT(*) FROM pairs""")
n = cursor.fetchone()[0]
@ -184,6 +187,7 @@ class Markov(plugins.ChannelDBHandler, callbacks.Privmsg):
"""
channel = privmsgs.getChannel(msg, args)
db = self.getDb(channel)
#debug.printf([channel, db.db.filename])
cursor = db.cursor()
cursor.execute("""SELECT COUNT(*) FROM pairs WHERE is_first=1""")
n = cursor.fetchone()[0]
@ -198,6 +202,7 @@ class Markov(plugins.ChannelDBHandler, callbacks.Privmsg):
"""
channel = privmsgs.getChannel(msg, args)
db = self.getDb(channel)
#debug.printf([channel, db.db.filename])
cursor = db.cursor()
cursor.execute("""SELECT COUNT(*) FROM follows""")
n = cursor.fetchone()[0]
@ -212,6 +217,7 @@ class Markov(plugins.ChannelDBHandler, callbacks.Privmsg):
"""
channel = privmsgs.getChannel(msg, args)
db = self.getDb(channel)
#debug.printf([channel, db.db.filename])
cursor = db.cursor()
cursor.execute("""SELECT COUNT(*) FROM follows WHERE word ISNULL""")
n = cursor.fetchone()[0]