Fix for bug #1081086. Be sure to read the reasoning in the bug itself.

This commit is contained in:
Jeremy Fincher 2004-12-08 06:16:08 +00:00
parent bda9e9144c
commit 1a63af3b26
2 changed files with 12 additions and 3 deletions

View File

@ -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)

View File

@ -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):