def refresh(self, irc, msg, args, channel):
        """[<channel>]
        Refreshes current topic set by anyone. Restores topic if empty.
        <channel> is only necessary if the message isn't sent in the channel
        itself.
        """
        self._checkManageCapabilities(irc, msg, channel)
        topic = irc.state.channels[channel].topic
        if topic:
            self._sendTopics(irc, channel, topic)
            return
        try:
            topics = self.lastTopics[channel]
            if not topics:
                raise KeyError
        except __HOLE__:
            irc.error(format(_('I haven\'t yet set the topic in %s.'),
                             channel))
            return
        self._sendTopics(irc, channel, topics)
dataset/ETHPy150Open ProgVal/Limnoria/plugins/Topic/plugin.py/Topic.refresh