From ba3d706b39d5848725684ea6fc84c873c920d759 Mon Sep 17 00:00:00 2001 From: Chris Skalenda Date: Sun, 5 Jul 2009 10:42:07 -0500 Subject: [PATCH] .tell: probation is now channel specific. --- plugins/tell.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/tell.py b/plugins/tell.py index 0e73fda..b08bde9 100644 --- a/plugins/tell.py +++ b/plugins/tell.py @@ -57,8 +57,8 @@ def tell(bot, input): dbpath = os.path.join(bot.persist_dir, dbname) conn = dbconnect(dbpath) - command = "select count(*) from tell_probation where name=?" - if conn.execute(command, (input.nick,)).fetchone()[0] > 0: + command = "select count(*) from tell_probation where name=? and chan=?" + if conn.execute(command, (input.nick,input.chan)).fetchone()[0] > 0: return "No." command = "select count(*) from tell where name=? and user_from=?" @@ -91,7 +91,7 @@ def dbconnect(db): results = conn.execute("select count(*) from sqlite_master where name=?", ("tell_probation" ,)).fetchone() if results[0] == 0: conn.execute("create table if not exists "+ \ - "tell_probation(name varchar(50),"+ \ + "tell_probation(name varchar(50), chan varchar(50),"+ \ "primary key(name));") conn.commit()