3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-28 05:32:51 +01:00

networks.remote: properly error if the target service is not available on the target network

Closes #554.
This commit is contained in:
James Lu 2018-05-10 16:05:36 -07:00
parent f1b3d8d0ad
commit 613e6412a2

View File

@ -113,6 +113,10 @@ def remote(irc, source, args):
irc.error('Network %r is not connected.' % netname)
REMOTE_IN_USE.clear()
return
elif not world.services[args.service].uids.get(netname):
irc.error('The requested service %r is not available on %r.' % (args.service, netname))
REMOTE_IN_USE.clear()
return
# Force remoteirc.called_in to something private in order to prevent
# accidental information leakage from replies.