def cmd(send, msg, args):
    """Gets previous nicks.

    Syntax: {command} <nick>

    """
    if not msg:
        with args['handler'].data_lock:
            users = list(args['handler'].channels[args['target']].users()) if args['target'] != 'private' else [args['nick']]
        msg = choice(users)
    chain = get_chain(args['db'], msg)
    if chain:
        send(" -> ".join(chain))
    else:
        send("%s has never changed their nick." % msg)
Gets previous nicks.

    Syntax: {command} <nick>