def on_ctcp(self, mask=None, target=None, ctcp=None, **kw):
        lctcp = ctcp.split(' ')[0].lower()
        if lctcp in self.bot.config.ctcp:
            try:
                self.queue.put_nowait((mask.nick, lctcp))
            except QueueFull:
                self.handle_flood()
            else:
                if self.handle is None:
                    self.handle = self.bot.loop.call_later(1, self.clear_queue)
                data = self.bot.config.ctcp[lctcp].format(now=datetime.now(),
                                                          **self.bot.config)
                self.bot.ctcp_reply(mask.nick, '%s %s' % (lctcp.upper(), data))
dataset/ETHPy150Open gawel/irc3/irc3/plugins/ctcp.py/CTCP.on_ctcp/original