3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-27 21:19:31 +01:00

networks: show an error instead of silently failing if the command is empty

This commit is contained in:
James Lu 2017-03-31 17:13:04 -07:00
parent 0749a42ef6
commit ad4fe1924b

View File

@ -68,6 +68,10 @@ def remote(irc, source, args):
args = remote_parser.parse_args(args) args = remote_parser.parse_args(args)
netname = args.network netname = args.network
if not args.command:
irc.error("No command specified!")
return
# XXX: things like 'remote network1 remote network2 echo hi' will crash PyLink if the source network is network1... # XXX: things like 'remote network1 remote network2 echo hi' will crash PyLink if the source network is network1...
global REMOTE_IN_USE global REMOTE_IN_USE
if REMOTE_IN_USE.is_set(): if REMOTE_IN_USE.is_set():