mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
ServiceBot: break when trying to alias a command to itself
This commit is contained in:
parent
63ce7ea407
commit
5ed4f8bf85
4
utils.py
4
utils.py
@ -353,6 +353,10 @@ class ServiceBot():
|
||||
# If this is an alias, store the primary command in the alias_cmds dict
|
||||
if aliases is not None:
|
||||
for alias in aliases:
|
||||
if name == alias:
|
||||
log.error('Refusing to alias command %r (in plugin %r) to itself!', name, func.__module__)
|
||||
continue
|
||||
|
||||
self.add_cmd(func, name=alias) # Bind the alias as well.
|
||||
self.alias_cmds[alias] = name
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user