Made join/part network-specific.

This commit is contained in:
Jeremy Fincher 2004-10-24 07:38:55 +00:00
parent 7f5a12a893
commit c0254f87d8
1 changed files with 3 additions and 2 deletions

View File

@ -159,7 +159,7 @@ class Admin(privmsgs.CapabilityCheckingPrivmsg):
if not irc.isChannel(channel):
irc.errorInvalid('channel', channel)
return
conf.supybot.channels().add(original)
conf.supybot.networks.get(irc.network).channels().add(original)
maxchannels = irc.state.supported.get('maxchannels', sys.maxint)
if len(irc.state.channels) + len(channels) > maxchannels:
irc.error('I\'m already too close to maximum number of '
@ -260,7 +260,8 @@ class Admin(privmsgs.CapabilityCheckingPrivmsg):
return
for chan in channels:
try:
conf.supybot.channels.removeChannel(chan)
network = conf.supybot.networks.get(irc.network)
network.channels.removeChannel(chan)
except KeyError:
pass # It might be in the network thingy.
try: