undo some bad changes

This commit is contained in:
Ryan Hitchman 2010-08-24 17:14:55 -05:00
parent 12035fee94
commit 713b21d9f7
3 changed files with 4 additions and 4 deletions

View File

@ -9,8 +9,8 @@ class Input(dict):
def __init__(self, conn, raw, prefix, command, params, def __init__(self, conn, raw, prefix, command, params,
nick, user, host, paraml, msg): nick, user, host, paraml, msg):
chan = paraml[0] chan = paraml[0].lower()
if chan.lower() == conn.nick.lower(): # is a PM if chan == conn.nick.lower(): # is a PM
chan = nick chan = nick
def say(msg): def say(msg):

View File

@ -33,7 +33,7 @@ def nrolls(count, n):
@hook.command('roll') @hook.command('roll')
@hook.regex(valid_diceroll, re.I) #@hook.regex(valid_diceroll, re.I)
@hook.command @hook.command
def dice(inp): def dice(inp):
".dice <diceroll> -- simulates dicerolls, e.g. .dice 2d20-d5+4 roll 2 " \ ".dice <diceroll> -- simulates dicerolls, e.g. .dice 2d20-d5+4 roll 2 " \

View File

@ -12,7 +12,7 @@ def db_init(db):
def get_memory(db, chan, word): def get_memory(db, chan, word):
row = db.execute("select data from memory where chan=lower(?) and word=lower(?)", row = db.execute("select data from memory where chan=? and word=lower(?)",
(chan, word)).fetchone() (chan, word)).fetchone()
if row: if row:
return row[0] return row[0]