Add channel verification before read and parse a message
This commit is contained in:
parent
0ceb475008
commit
df4caf2e74
@ -166,7 +166,7 @@ class Message:
|
||||
#Try modules
|
||||
else:
|
||||
for im in mods:
|
||||
if im.has_access(self) im.parseask(self):
|
||||
if im.has_access(self) and im.parseask(self):
|
||||
return
|
||||
|
||||
#Owner commands
|
||||
@ -221,12 +221,12 @@ class Message:
|
||||
|
||||
else:
|
||||
for im in mods:
|
||||
if im.parseanswer(self):
|
||||
if im.has_access(self) and im.parseanswer(self):
|
||||
return
|
||||
|
||||
else:
|
||||
for im in mods:
|
||||
if im.parselisten(self):
|
||||
if im.has_access(self) and im.parselisten(self):
|
||||
return
|
||||
|
||||
# def parseOwnerCmd(self, cmd):
|
||||
|
@ -119,6 +119,7 @@ def load_module(config, servers):
|
||||
mod.print = lambda msg: print("[%s] %s"%(mod.name, msg))
|
||||
mod.DATAS = xmlparser.parse_file(datas_path + "/" + config["name"] + ".xml")
|
||||
mod.CONF = config
|
||||
mod.SRVS = servers
|
||||
mod.has_access = lambda msg: mod_has_access(mod, config, msg)
|
||||
mod.save = lambda: mod_save(mod, datas_path, config)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user