From 7e0a61d405fb7a0097d68d61a2eac8c12bfc11d7 Mon Sep 17 00:00:00 2001 From: jcao219 Date: Tue, 2 Aug 2011 08:46:14 -0500 Subject: [PATCH] fixed some bugs with database connection, and fixed a grammar mistake --- var.py | 2 +- wolfgame.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/var.py b/var.py index 6ce5fe6..d5a0adf 100644 --- a/var.py +++ b/var.py @@ -157,7 +157,7 @@ class ChangedRolesMode(object): import sqlite3 import os -conn = sqlite3.connect("data.sqlite3") +conn = sqlite3.connect("data.sqlite3", check_same_thread = False) c = conn.cursor() c.execute('CREATE TABLE IF NOT EXISTS away (nick TEXT)') diff --git a/wolfgame.py b/wolfgame.py index 09a2295..fa08880 100644 --- a/wolfgame.py +++ b/wolfgame.py @@ -395,7 +395,7 @@ def stats(cli, nick, chan, rest): for role in rs: count = len(var.ROLES[role]) - if not f and count>1: + if not f or count > 1 or not count: vb = "are" f = True elif not f: @@ -737,7 +737,6 @@ def reaper(cli, gameid): elif (tdiff > timedelta(seconds=var.KILL_IDLE_TIME) and nick in var.IDLE_WARNED): to_kill.append(nick) - print("WILL KILL "+nick) elif (tdiff < timedelta(seconds=var.WARN_IDLE_TIME) and nick in var.IDLE_WARNED): var.IDLE_WARNED.remove(nick) # he saved himself from death