mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-19 08:59:27 +01:00
Topic: allow configuring whether the separator is allowed in topics
This commit is contained in:
parent
f4425de7c5
commit
4f38958b70
@ -79,6 +79,11 @@ conf.registerChannelValue(Topic, 'requireManageCapability',
|
|||||||
channel-level capabilities.
|
channel-level capabilities.
|
||||||
Note that absence of an explicit anticapability means user has
|
Note that absence of an explicit anticapability means user has
|
||||||
capability.""")))
|
capability.""")))
|
||||||
|
conf.registerChannelValue(Topic, 'allowSeparatorinTopics',
|
||||||
|
registry.Boolean(True, _("""Determines whether the bot will allow
|
||||||
|
topics containing the defined separator to be used. You may want
|
||||||
|
to disable this if you are signing all topics by nick (see the 'format'
|
||||||
|
option for ways to adjust this).""")))
|
||||||
|
|
||||||
|
|
||||||
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
|
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
|
||||||
|
@ -63,7 +63,8 @@ def canChangeTopic(irc, msg, args, state):
|
|||||||
|
|
||||||
def getTopic(irc, msg, args, state, format=True):
|
def getTopic(irc, msg, args, state, format=True):
|
||||||
separator = state.cb.registryValue('separator', state.channel)
|
separator = state.cb.registryValue('separator', state.channel)
|
||||||
if separator in args[0]:
|
if separator in args[0] and not \
|
||||||
|
state.cb.registryValue('allowSeparatorinTopics', state.channel):
|
||||||
state.errorInvalid('topic', args[0],
|
state.errorInvalid('topic', args[0],
|
||||||
format(_('The topic must not include %q.'),
|
format(_('The topic must not include %q.'),
|
||||||
separator))
|
separator))
|
||||||
|
Loading…
Reference in New Issue
Block a user