Let's not connect multiple times to a network.

This commit is contained in:
Jeremy Fincher 2004-08-23 12:38:33 +00:00
parent c0386751cf
commit 1704fa2cfe

View File

@ -748,6 +748,9 @@ class Owner(privmsgs.CapabilityCheckingPrivmsg):
defaults to 6667, the default port for IRC.
"""
(network, server) = privmsgs.getArgs(args, optional=1)
for otherIrc in world.ircs:
if otherIrc.network == network:
irc.error('I\'m already connected to %s.' % network,Raise=True)
if server:
if ':' in server:
(server, port) = server.split(':')