mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Fixed bug #846332.
This commit is contained in:
parent
43c594661c
commit
0da5c27380
@ -122,7 +122,11 @@ class Topic(callbacks.Privmsg):
|
||||
topics = self._splitTopic(irc.state.getTopic(channel))
|
||||
if topics:
|
||||
try:
|
||||
irc.reply(msg, topics[number])
|
||||
match = self.topicUnformatter.match(topics[number])
|
||||
if match:
|
||||
irc.reply(msg, match.group(1))
|
||||
else:
|
||||
irc.reply(msg, topics[number])
|
||||
except IndexError:
|
||||
irc.error(msg, 'That\'s not a valid topic.')
|
||||
else:
|
||||
|
@ -50,8 +50,11 @@ class TopicTestCase(ChannelPluginTestCase, PluginDocumentation):
|
||||
_ = self.getMsg('topic add bar')
|
||||
_ = self.getMsg('topic add baz')
|
||||
self.assertRegexp('topic get 1', '^foo')
|
||||
self.assertNotRegexp('topic get 1', self.nick)
|
||||
self.assertRegexp('topic get 2', '^bar')
|
||||
self.assertNotRegexp('topic get 2', self.nick)
|
||||
self.assertRegexp('topic get 3', '^baz')
|
||||
self.assertNotRegexp('topic get 3', self.nick)
|
||||
self.assertError('topic get 0')
|
||||
|
||||
def testTopicAdd(self):
|
||||
|
Loading…
Reference in New Issue
Block a user