'Command body.'

def func(self):

    caller = self.caller
    lock = 'perm({})    or    perm(events_validating)'.format(VALIDATING)
    validator = caller.locks.check_lockstring(caller, lock)
    lock = 'perm({})    or    perm(events_without_validation)'.format(WITHOUT_VALIDATION)
    autovalid = caller.locks.check_lockstring(caller, lock)
    self.handler = get_event_handler()
    self.obj = None
    rhs = (self.rhs or '')
    (self.callback_name, sep, self.parameters) = rhs.partition('    ')
    self.callback_name = self.callback_name.lower()
    self.is_validator = validator
    self.autovalid = autovalid
    if (self.handler is None):
        caller.msg("The    event    handler    is    not    running,    can't    access    the    event    system.")
        return
    if self.lhs:
        self.obj = caller.search(self.lhs)
        if (not self.obj):
            return
    switch = ((self.switches and self.switches[0]) or '')
    if ((switch in ('', 'add', 'edit', 'del')) and (self.obj is None)):
        caller.msg("Specify    an    object's    name    or    #ID.")
        return
    if (switch == ''):
        self.list_callbacks()
    elif (switch == 'add'):
        self.add_callback()
    elif (switch == 'edit'):
        self.edit_callback()
    elif (switch == 'del'):
        self.del_callback()
    elif ((switch == 'accept') and validator):
        self.accept_callback()
    elif (switch in ['tasks', 'task']):
        self.list_tasks()
    else:
        caller.msg('Mutually    exclusive    or    invalid    switches    were    used,    cannot    proceed.')
