Alias module: detect alias only if line begins with !
This commit is contained in:
parent
0daef1e810
commit
1810055ccc
@ -118,9 +118,9 @@ def treat_variables(res):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def treat_alias(msg, hooks_cache):
|
def treat_alias(msg, hooks_cache):
|
||||||
if msg.cmd == "PRIVMSG" and (len(msg.cmds[0]) > 0 and
|
if msg.cmd == "PRIVMSG" and (len(msg.cmds[0]) > 0 and msg.cmds[0][0] == "!"
|
||||||
msg.cmds[0][1:] in DATAS.getNode("aliases").index and
|
and msg.cmds[0][1:] in DATAS.getNode("aliases").index
|
||||||
msg.cmds[0][1:] not in hooks_cache("cmd_hook")):
|
and msg.cmds[0][1:] not in hooks_cache("cmd_hook")):
|
||||||
msg.content = msg.content.replace(msg.cmds[0],
|
msg.content = msg.content.replace(msg.cmds[0],
|
||||||
DATAS.getNode("aliases").index[msg.cmds[0][1:]]["origin"], 1)
|
DATAS.getNode("aliases").index[msg.cmds[0][1:]]["origin"], 1)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user