mirror of
https://github.com/jlu5/PyLink.git
synced 2025-02-02 15:44:06 +01:00
parseModes: allow type str as modestring
This commit is contained in:
parent
5e16eeea41
commit
9ea6769c54
@ -480,6 +480,11 @@ class Irc():
|
|||||||
# 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.
|
||||||
|
|
||||||
|
if type(args) == str:
|
||||||
|
# If the modestring was given as a string, split it into a list.
|
||||||
|
args = args.split()
|
||||||
|
|
||||||
assert args, 'No valid modes were supplied!'
|
assert args, 'No valid modes were supplied!'
|
||||||
usermodes = not utils.isChannel(target)
|
usermodes = not utils.isChannel(target)
|
||||||
prefix = ''
|
prefix = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user