Made join/part network-specific.

This commit is contained in:
Jeremy Fincher 2004-10-24 07:38:55 +00:00
parent 7f5a12a893
commit c0254f87d8

View File

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