Strip prefix_symbols
from PRIVMSG target, for e.g. 'PRIVMSG +#chan :hi'
(line_handler.py)
This commit is contained in:
parent
0bb2491399
commit
1301e80621
1 changed files with 5 additions and 0 deletions
|
@ -410,6 +410,11 @@ class Module(ModuleManager.BaseModule):
|
|||
message_split = message.split(" ")
|
||||
target = event["args"][0]
|
||||
|
||||
# strip prefix_symbols from the start of target, for when people use
|
||||
# e.g. 'PRIVMSG +#channel :hi' which would send a message to only
|
||||
# voiced-or-above users
|
||||
target = target.lstrip(list(event["server"].prefix_symbols.keys()))
|
||||
|
||||
channel = None
|
||||
if target[0] in event["server"].channel_types:
|
||||
channel = event["server"].channels.get(event["args"][0])
|
||||
|
|
Loading…
Reference in a new issue