def METHOD_NAME(self, connection, event):
    channel = event.target
    if not irc.client.is_channel(channel):
        return
    text = event.arguments[0]
    nickname = self.get_nick_if_possible(event.source)