'Implements the command.'

def func(self):

    caller = self.caller
    args = self.args
    if hasattr(caller, 'player'):
        caller = caller.player
    if (not args):
        self.msg('Usage:    @delplayer    <player/user    name    or    #id>    [:    reason]')
        return
    reason = ''
    if (':' in args):
        (args, reason) = [arg.strip() for arg in args.split(':', 1)]
    players = search.player_search(args)
    if (not players):
        self.msg('Could    not    find    a    player    by    that    name.')
        return
    if (len(players) > 1):
        string = 'There    were    multiple    matches:\n'
        string += '\n'.join((('    %s    %s' % (player.id, player.key)) for player in players))
        self.msg(string)
        return
    player = players.pop()
    if (not player.access(caller, 'delete')):
        string = "You    don't    have    the    permissions    to    delete    that    player."
        self.msg(string)
        return
    uname = player.username
    self.msg('Informing    and    disconnecting    player    ...')
    string = ("\nYour    account    '%s'    is    being    *permanently*    deleted.\n" % uname)
    if reason:
        string += ("    Reason    given:\n        '%s'" % reason)
    player.msg(string)
    player.delete()
    self.msg(('Player    %s    was    successfully    deleted.' % uname))
