From 6e699816d02c14ff9dc69820deec7aa20f37a72a Mon Sep 17 00:00:00 2001 From: nyuszika7h Date: Mon, 2 Jan 2012 14:15:01 +0100 Subject: [PATCH] Channel: Make supybot.alwaysJoinOnInvite channel-specific. Closes GH-159. --- plugins/Admin/plugin.py | 2 +- src/conf.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/Admin/plugin.py b/plugins/Admin/plugin.py index 6a84648b9..c82e44b67 100644 --- a/plugins/Admin/plugin.py +++ b/plugins/Admin/plugin.py @@ -117,7 +117,7 @@ class Admin(callbacks.Plugin): def doInvite(self, irc, msg): channel = msg.args[1] if channel not in irc.state.channels: - if conf.supybot.alwaysJoinOnInvite() or \ + if conf.supybot.alwaysJoinOnInvite.get(channel) or \ ircdb.checkCapability(msg.prefix, 'admin'): self.log.info('Invited to %s by %s.', channel, msg.prefix) networkGroup = conf.supybot.networks.get(irc.network) diff --git a/src/conf.py b/src/conf.py index 4f8fb0bb0..f631de351 100644 --- a/src/conf.py +++ b/src/conf.py @@ -439,7 +439,7 @@ registerGlobalValue(supybot, 'followIdentificationThroughNickChanges', will cause the bot to track such changes. It defaults to False for a little greater security."""))) -registerGlobalValue(supybot, 'alwaysJoinOnInvite', +registerChannelValue(supybot, 'alwaysJoinOnInvite', 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 a channel if the user inviting it has the 'admin' capability (or if it's