diff --git a/core/main.py b/core/main.py index da35066..7aaf512 100644 --- a/core/main.py +++ b/core/main.py @@ -9,8 +9,8 @@ class Input(dict): def __init__(self, conn, raw, prefix, command, params, nick, user, host, paraml, msg): - chan = paraml[0] - if chan.lower() == conn.nick.lower(): # is a PM + chan = paraml[0].lower() + if chan == conn.nick.lower(): # is a PM chan = nick def say(msg): diff --git a/plugins/dice.py b/plugins/dice.py index ea5eb27..02fd231 100644 --- a/plugins/dice.py +++ b/plugins/dice.py @@ -33,7 +33,7 @@ def nrolls(count, n): @hook.command('roll') -@hook.regex(valid_diceroll, re.I) +#@hook.regex(valid_diceroll, re.I) @hook.command def dice(inp): ".dice -- simulates dicerolls, e.g. .dice 2d20-d5+4 roll 2 " \ diff --git a/plugins/remember.py b/plugins/remember.py index 55841f8..97f035c 100644 --- a/plugins/remember.py +++ b/plugins/remember.py @@ -12,7 +12,7 @@ def db_init(db): 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() if row: return row[0]