mirror of
https://github.com/jlu5/PyLink.git
synced 2025-02-17 14:01:03 +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.
|
# B = Mode that changes a setting and always has a parameter.
|
||||||
# C = Mode that changes a setting and only has a parameter when set.
|
# C = Mode that changes a setting and only has a parameter when set.
|
||||||
# D = Mode that changes a setting and never has a parameter.
|
# D = Mode that changes a setting and never has a parameter.
|
||||||
|
assert args, 'No valid modes were supplied!'
|
||||||
usermodes = not isChannel(target)
|
usermodes = not isChannel(target)
|
||||||
prefix = ''
|
prefix = ''
|
||||||
modestring = args[0]
|
modestring = args[0]
|
||||||
if not modestring:
|
|
||||||
return ValueError('No modes supplied in parseModes query: %r' % modes)
|
|
||||||
args = args[1:]
|
args = args[1:]
|
||||||
if usermodes:
|
if usermodes:
|
||||||
log.debug('(%s) Using irc.umodes for this query: %s', irc.name, irc.umodes)
|
log.debug('(%s) Using irc.umodes for this query: %s', irc.name, irc.umodes)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user