From 7ad48ee412912b152bfdb667edd57f7fdf74af31 Mon Sep 17 00:00:00 2001 From: Janik Kleinhoff Date: Mon, 8 Dec 2014 13:01:12 +0000 Subject: [PATCH] Always initialize opt-in ping list If OPT_IN_PING is enabled via botconfig.py, OPT_IN_PING isn't set to True at the time we set up tables as necessary, so people using !in will make the bot run into the lack of table and crash. We already do this with the away list even if we're going to use opt-in ping, so this shouldn't cause any issues. --- settings/wolfgame.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/settings/wolfgame.py b/settings/wolfgame.py index 352dc5f..5e51576 100644 --- a/settings/wolfgame.py +++ b/settings/wolfgame.py @@ -718,12 +718,11 @@ with conn: 'wolfwins SMALLINT, monsterwins SMALLINT, foolwins SMALLINT, totalgames SMALLINT, UNIQUE(gamemode, size))')) - if OPT_IN_PING: - c.execute('CREATE TABLE IF NOT EXISTS ping (cloak text)') + c.execute('CREATE TABLE IF NOT EXISTS ping (cloak text)') - c.execute('SELECT * FROM ping') - for row in c: - PING_IN.append(row[0]) + c.execute('SELECT * FROM ping') + for row in c: + PING_IN.append(row[0]) def remove_away(clk):