mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Added some debugging printfs that may be useful in the future.
This commit is contained in:
parent
7b26501f15
commit
6b5ef88c06
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user