Merge pull request #301 from nyuszika7h/testing

Channel: Make supybot.alwaysJoinOnInvite channel-specific. Closes GH-159.
This commit is contained in:
Valentin Lorentz 2012-01-02 05:18:44 -08:00
commit c2fc7b7492
2 changed files with 2 additions and 2 deletions

View File

@ -117,7 +117,7 @@ class Admin(callbacks.Plugin):
def doInvite(self, irc, msg): def doInvite(self, irc, msg):
channel = msg.args[1] channel = msg.args[1]
if channel not in irc.state.channels: if channel not in irc.state.channels:
if conf.supybot.alwaysJoinOnInvite() or \ if conf.supybot.alwaysJoinOnInvite.get(channel) or \
ircdb.checkCapability(msg.prefix, 'admin'): ircdb.checkCapability(msg.prefix, 'admin'):
self.log.info('Invited to %s by %s.', channel, msg.prefix) self.log.info('Invited to %s by %s.', channel, msg.prefix)
networkGroup = conf.supybot.networks.get(irc.network) networkGroup = conf.supybot.networks.get(irc.network)

View File

@ -439,7 +439,7 @@ registerGlobalValue(supybot, 'followIdentificationThroughNickChanges',
will cause the bot to track such changes. It defaults to False for a will cause the bot to track such changes. It defaults to False for a
little greater security."""))) little greater security.""")))
registerGlobalValue(supybot, 'alwaysJoinOnInvite', registerChannelValue(supybot, 'alwaysJoinOnInvite',
registry.Boolean(False, _("""Determines whether the bot will always join a registry.Boolean(False, _("""Determines whether the bot will always join a
channel when it's invited. If this value is False, the bot will only join channel when it's invited. If this value is False, the bot will only join
a channel if the user inviting it has the 'admin' capability (or if it's a channel if the user inviting it has the 'admin' capability (or if it's