Some extra error checking.

This commit is contained in:
Jeremy Fincher 2004-09-16 10:56:02 +00:00
parent a26e664cf8
commit 5be5a2c379

View File

@ -132,6 +132,9 @@ class Network(callbacks.Privmsg):
on. on.
""" """
network = self._getNetwork(irc, args) network = self._getNetwork(irc, args)
if args:
irc.error('I\'m not connected to %s.' % privmsgs.getArgs(args))
return
badIrc = self._getIrc(network) badIrc = self._getIrc(network)
try: try:
badIrc.driver.reconnect() badIrc.driver.reconnect()
@ -292,6 +295,9 @@ class Network(callbacks.Privmsg):
apply. apply.
""" """
network = self._getNetwork(irc, args) network = self._getNetwork(irc, args)
if args:
irc.error('I\'m not connected to %s.' % privmsgs.getArgs(args))
return
otherIrc = self._getIrc(network) otherIrc = self._getIrc(network)
otherIrc.queueMsg(ircmsgs.ping('Latency check (from %s).' % msg.nick)) otherIrc.queueMsg(ircmsgs.ping('Latency check (from %s).' % msg.nick))
self._latency[otherIrc] = (irc, time.time()) self._latency[otherIrc] = (irc, time.time())