From 9b101675114efb7b4ba2dcfa1c22b82449675c0c Mon Sep 17 00:00:00 2001 From: Jimmy Cao Date: Sun, 23 Oct 2011 15:20:37 -0500 Subject: [PATCH] removed nick change tracking --- var.py | 20 -------------------- wolfgame.py | 2 -- 2 files changed, 22 deletions(-) diff --git a/var.py b/var.py index 48b9866..f3a9e29 100644 --- a/var.py +++ b/var.py @@ -213,26 +213,6 @@ def add_player_record(nick, cloak): with conn: c.execute('INSERT OR IGNORE INTO players (nick, cloak) VALUES (?,?)', (nick, cloak)) - -def record_nick_change(from_nick, to_nick, cloak): - with conn: - c.execute('SELECT id FROM players WHERE nick=? AND cloak=?', (from_nick, cloak)) - row = c.fetchone() - if not row: - return # No records for this player - old_plid = row[0] - c.execute('INSERT OR IGNORE INTO players (nick, cloak) VALUES (?,?)', (to_nick, cloak)) - - # create a new entry in the players table for this nick - c.execute('SELECT id FROM players WHERE nick=? AND cloak=?', (to_nick, cloak)) - new_plid = c.fetchone()[0] - - c.execute('SELECT * FROM nick_changes WHERE old=? AND new=?', (new_plid, old_plid)) - - if not c.fetchone(): # not recorded yet - c.execute('INSERT OR IGNORE INTO nick_changes (old, new) VALUES (?, ?)', (old_plid, new_plid)) - - def update_role_stats(nick, clk, role, won, iwon): diff --git a/wolfgame.py b/wolfgame.py index 74521e0..22e6ef0 100644 --- a/wolfgame.py +++ b/wolfgame.py @@ -1012,8 +1012,6 @@ def on_nick(cli, prefix, nick): if prefix == var.ADMIN_TO_PING: var.ADMIN_TO_PING = nick - - var.record_nick_change(prefix, nick, cloak) for k,v in var.ORIGINAL_ROLES.items(): if prefix in v: