don't have [''] as args_split when there's no args (for alias)

This commit is contained in:
jesopo 2019-12-21 21:16:14 +00:00
parent 3c77793490
commit b0a71f8bb2

View file

@ -59,9 +59,13 @@ class Module(ModuleManager.BaseModule):
event["command"].command)
if not alias == None:
alias, alias_args = alias
given_args = []
if event["command"].args:
given_args = event["command"].args.split(" ")
event["command"].command = alias
event["command"].args = self._arg_replace(alias_args,
event["command"].args.split(" "),
event["command"].args = self._arg_replace(alias_args, given_args,
{"NICK": event["user"].nickname})
@utils.hook("received.command.alias")