mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Fix for bug #1081086. Be sure to read the reasoning in the bug itself.
This commit is contained in:
parent
bda9e9144c
commit
1a63af3b26
@ -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)
|
||||
|
||||
|
10
src/conf.py
10
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):
|
||||
|
Loading…
Reference in New Issue
Block a user