From e6545f8ce71fc18c89f0204f17c1b0d0657a07c4 Mon Sep 17 00:00:00 2001 From: Chris Skalenda Date: Sun, 5 Jul 2009 10:54:20 -0500 Subject: [PATCH] .seen and .tell: resize the username and chan columns to match max lengths on synirc. --- plugins/seen.py | 4 ++-- plugins/tell.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/seen.py b/plugins/seen.py index 323aab6..0fe1fd8 100644 --- a/plugins/seen.py +++ b/plugins/seen.py @@ -70,8 +70,8 @@ def dbconnect(db): if(results[0] == 0): conn.execute("create table if not exists "+ \ - "seen(name varchar(50) not null, date datetime not null, "+ \ - "quote varchar(250) not null, chan varchar(50) not null, "+ \ + "seen(name varchar(30) not null, date datetime not null, "+ \ + "quote varchar(250) not null, chan varchar(32) not null, "+ \ "primary key(name, chan));") conn.commit() diff --git a/plugins/tell.py b/plugins/tell.py index f3bbcb7..8ca6c66 100644 --- a/plugins/tell.py +++ b/plugins/tell.py @@ -83,16 +83,16 @@ def dbconnect(db): if results[0] == 0: conn.execute("create table if not exists "+ \ - "tell(id integer primary key autoincrement, name varchar(50) not null, "+ \ - "user_from varchar(50) not null, quote varchar(250) not null, "+ \ - "chan varchar(50) not null, date datetime not null);") + "tell(id integer primary key autoincrement, name varchar(30) not null, "+ \ + "user_from varchar(30) not null, quote varchar(250) not null, "+ \ + "chan varchar(32) not null, date datetime not null);") conn.commit() 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), chan varchar(50),"+ \ + "tell_probation(name varchar(30), chan varchar(32),"+ \ "primary key(name, chan));") conn.commit()