added refresh command to Topic plugin

This commit is contained in:
Julian Paul Glass 2014-11-21 03:24:10 +00:00
parent d35e67046b
commit 54ee1e7670

View File

@ -531,13 +531,13 @@ class Topic(callbacks.Plugin):
""" """
if not self._checkManageCapabilities(irc, msg, channel): if not self._checkManageCapabilities(irc, msg, channel):
capabilities = self.registryValue('requireManageCapability') capabilities = self.registryValue('requireManageCapability')
irc.errorNoCapability(capabilities, raise=True) irc.errorNoCapability(capabilities, Raise=True)
topic = irc.state.channels[channel].topic topic = irc.state.channels[channel].topic
if topic: if topic:
self._sendTopics(irc, channel, topic) self._sendTopics(irc, channel, topic)
else: else:
self.restore(self, irc, msg, args, channel) self.restore(irc, msg, args, channel)
set = wrap(refresh, ['canChangeTopic']) set = wrap(refresh, ['canChangetopic'])
@internationalizeDocstring @internationalizeDocstring
def undo(self, irc, msg, args, channel): def undo(self, irc, msg, args, channel):