mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Let's make sure is always in the string.
This commit is contained in:
parent
6ecf2ae6ea
commit
4a36ef95ec
@ -55,8 +55,17 @@ conf.registerPlugin('Topic')
|
||||
conf.registerChannelValue(conf.supybot.plugins.Topic, 'separator',
|
||||
registry.StringSurroundedBySpaces(' || ', """Determines what separator is
|
||||
used between individually added topics in the channel topic."""))
|
||||
|
||||
class TopicFormat(registry.String):
|
||||
"Value must include $topic, otherwise the actual topic would be left out."
|
||||
def setValue(self, v):
|
||||
if '$topic' in v or '${topic}' in v:
|
||||
registry.String.setValue(self, v)
|
||||
else:
|
||||
self.error()
|
||||
|
||||
conf.registerChannelValue(conf.supybot.plugins.Topic, 'format',
|
||||
registry.String('$topic ($nick)', """Determines what format is used to add
|
||||
TopicFormat('$topic ($nick)', """Determines what format is used to add
|
||||
topics in the topic. All the standard substitutes apply, in addiction to
|
||||
"$topic" for the topic itself."""))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user