Fix !ftemplate
This commit is contained in:
parent
8dddd4c3b0
commit
20d5ede0f2
@ -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)
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user