mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
NetworkCoreWUtils: strip off leading and trailing quotes from parse_modes
This commit is contained in:
parent
762ec3a0eb
commit
aeaee491f3
@ -560,6 +560,13 @@ class PyLinkNetworkCoreWithUtils(PyLinkNetworkCore):
|
||||
args = args.split()
|
||||
|
||||
assert args, 'No valid modes were supplied!'
|
||||
|
||||
# Strip off matching quotes from argparse and friends. We don't use str.strip()
|
||||
# because that might remove quotes that actually belong at the end of a string
|
||||
# (e.g. text filter args)
|
||||
if args.startswith(("'", '"')) and args.endswith(("'", '"')):
|
||||
args = args[1:-1]
|
||||
|
||||
usermodes = not self.is_channel(target)
|
||||
prefix = ''
|
||||
modestring = args[0]
|
||||
|
Loading…
Reference in New Issue
Block a user