Fix !ftemplate

This commit is contained in:
nyuszika7h 2016-09-08 22:07:00 +02:00
parent 8dddd4c3b0
commit 20d5ede0f2
2 changed files with 2 additions and 1 deletions

View File

@ -215,7 +215,7 @@ def delete_template(name):
if tid is not None: if tid is not None:
c = conn.cursor() c = conn.cursor()
c.execute("DELETE FROM access WHERE template = ?", (tid,)) c.execute("DELETE FROM access WHERE template = ?", (tid,))
c.execute("DELETE FROM template WHERE id = ?", (tid,)) c.execute("DELETE FROM access_template WHERE id = ?", (tid,))
def set_access(acc, hostmask, flags=None, tid=None): def set_access(acc, hostmask, flags=None, tid=None):
peid, plid = _get_ids(acc, hostmask) peid, plid = _get_ids(acc, hostmask)

View File

@ -6665,6 +6665,7 @@ def ftemplate(cli, nick, chan, rest):
name = params[0].upper() name = params[0].upper()
flags = params[1] flags = params[1]
tid, cur_flags = db.get_template(name) tid, cur_flags = db.get_template(name)
cur_flags = set(cur_flags)
if flags[0] != "+" and flags[0] != "-": if flags[0] != "+" and flags[0] != "-":
# flags is a template name # flags is a template name