Fix in modules: is_owner is now frm_owner

This commit is contained in:
nemunaire 2014-11-02 17:48:11 +01:00
parent 7c12f31d2c
commit 77b897a1e3
3 changed files with 3 additions and 3 deletions

View file

@ -111,7 +111,7 @@ def cmd_unalias(msg):
if alias[0] == "!" and len(alias) > 1:
alias = alias[1:]
if alias in DATAS.getNode("aliases").index:
if DATAS.getNode("aliases").index[alias]["creator"] == msg.nick or msg.is_owner:
if DATAS.getNode("aliases").index[alias]["creator"] == msg.nick or msg.frm_owner:
DATAS.getNode("aliases").delChild(DATAS.getNode("aliases").index[alias])
res.append(Response("%s a bien été supprimé" % alias, channel=msg.channel))
else:

View file

@ -145,7 +145,7 @@ def end_countdown(msg):
raise IRCException("quel événement terminer ?")
if msg.cmds[1] in DATAS.index:
if DATAS.index[msg.cmds[1]]["proprio"] == msg.nick or (msg.cmds[0] == "forceend" and msg.is_owner):
if DATAS.index[msg.cmds[1]]["proprio"] == msg.nick or (msg.cmds[0] == "forceend" and msg.frm_owner):
duration = countdown(msg.date - DATAS.index[msg.cmds[1]].getDate("start"))
del_event(DATAS.index[msg.cmds[1]]["id"])
DATAS.delChild(DATAS.index[msg.cmds[1]])

View file

@ -56,7 +56,7 @@ def del_site(msg):
site = DATAS.index[url]
for a in site.getNodes("alert"):
if a["channel"] == msg.channel:
if not (msg.frm == a["nick"] or msg.is_owner):
if not (msg.frm == a["nick"] or msg.frm_owner):
raise IRCException("vous ne pouvez pas supprimer cette URL.")
site.delChild(a)
if not site.hasNode("alert"):