From 1a63af3b26fc87ce2eb76c5efb58976783554e48 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Wed, 8 Dec 2004 06:16:08 +0000 Subject: [PATCH] Fix for bug #1081086. Be sure to read the reasoning in the bug itself. --- src/commands.py | 5 +++-- src/conf.py | 10 +++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/commands.py b/src/commands.py index 8ef3c61a8..403f07b87 100644 --- a/src/commands.py +++ b/src/commands.py @@ -240,8 +240,9 @@ def getBoolean(irc, msg, args, state): def getChannelDb(irc, msg, args, state, **kwargs): if not conf.supybot.databases.plugins.channelSpecific(): - state.args.append(None) - state.channel = None + channel = conf.supybot.databases.plugins.channelSpecific.channel() + state.args.append(channel) + state.channel = channel else: getChannel(irc, msg, args, state, **kwargs) diff --git a/src/conf.py b/src/conf.py index ffeec2ee8..8f4dc0679 100644 --- a/src/conf.py +++ b/src/conf.py @@ -780,7 +780,15 @@ registerGroup(supybot.databases, 'plugins') registerChannelValue(supybot.databases.plugins, 'channelSpecific', registry.Boolean(True, """Determines whether database-based plugins that can be channel-specific will be so. This can be overridden by individual - channels.""")) + channels. Do note that the bot likely needs to be restarted for changes of + this variable to take effect; also note that you may wish to set + supybot.databases.plugins.channelSpecific.channel appropriately if you + wish to share a certain channel's databases globally.""")) +registerGlobalValue(supybot.databases.plugins.channelSpecific, 'channel', + ValidChannel('#', """Determines what channel global (non-channel-specific) + databases will be considered a part of. This is helpful if you've been + running channel-specific for awhile and want to turn the databases for your + primary channel into global databases.""")) class CDB(registry.Boolean): def connect(self, filename):