def command(function):
    def canonical(name):
        return name.strip("_").replace("_", "-")

    name = canonical(function.__name__)
    register(name, function)
    return function
Decorate a function as an IRC command
dataset/ETHPy150Open sbp/duxlot/functions.py/command