diff --git a/plugins/Topic/config.py b/plugins/Topic/config.py index d18ac546d..f4d7a4344 100644 --- a/plugins/Topic/config.py +++ b/plugins/Topic/config.py @@ -79,6 +79,11 @@ conf.registerChannelValue(Topic, 'requireManageCapability', channel-level capabilities. Note that absence of an explicit anticapability means user has 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: diff --git a/plugins/Topic/plugin.py b/plugins/Topic/plugin.py index 1419d3cc8..ab3400457 100644 --- a/plugins/Topic/plugin.py +++ b/plugins/Topic/plugin.py @@ -63,7 +63,8 @@ def canChangeTopic(irc, msg, args, state): def getTopic(irc, msg, args, state, format=True): 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], format(_('The topic must not include %q.'), separator))