def METHOD_NAME(f):
    @wraps(f)
    def wrap(*args):
        inst = args[0]
        func_name = f.__name__
        if func_name.startswith("do_"):
            func_name = func_name[3:]
        if not inst.client.is_connected():
            print(format_text("\n'{0}' cannot be executed on offline mode\n".format(func_name), 'bold'))
            return
        ret = f(*args)
        return ret
    return wrap