mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
utils.parseModes: fix IndexError on empty query
This commit is contained in:
parent
1f95774131
commit
2e0a5e52e2
3
utils.py
3
utils.py
@ -170,11 +170,10 @@ def parseModes(irc, target, args):
|
||||
# B = Mode that changes a setting and always has a parameter.
|
||||
# C = Mode that changes a setting and only has a parameter when set.
|
||||
# D = Mode that changes a setting and never has a parameter.
|
||||
assert args, 'No valid modes were supplied!'
|
||||
usermodes = not isChannel(target)
|
||||
prefix = ''
|
||||
modestring = args[0]
|
||||
if not modestring:
|
||||
return ValueError('No modes supplied in parseModes query: %r' % modes)
|
||||
args = args[1:]
|
||||
if usermodes:
|
||||
log.debug('(%s) Using irc.umodes for this query: %s', irc.name, irc.umodes)
|
||||
|
Loading…
Reference in New Issue
Block a user