

def _findCallbacks(self, irc, command):
    command = list(map(callbacks.canonicalName, command))
    plugin_list = []
    for cb in irc.callbacks:
        if (not hasattr(cb, 'getCommand')):
            continue
        longest_matching_command = cb.getCommand(command)
        if (len(longest_matching_command) >= len(command)):
            plugin_list.append(cb.name())
    return plugin_list

dataset/ETHPy150Open ProgVal/Limnoria/plugins/Plugin/plugin.py Plugin._findCallbacks/original