Handles ignoring/unignoring people
    Syntax: {command} <--clear|--show/--list|--delete|nick>

def cmd(send, msg, args):
    """Handles ignoring/unignoring people
    Syntax: {command} <--clear|--show/--list|--delete|nick>
    """
    parser = arguments.ArgParser(args['config'])
    group = parser.add_mutually_exclusive_group()
    group.add_argument('--clear', action='store_true')
    group.add_argument('--show', '--list', action='store_true')
    group.add_argument('--delete', '--remove', action='store_true')
    parser.add_argument('nick', nargs='?')
    try:
        cmdargs = parser.parse_args(msg)
    except arguments.ArgumentException as e:
        send(str(e))
        return
    session = args['db']
    if cmdargs.clear:
        session.query(Ignore).delete()
        send("Ignore list cleared.")
    elif cmdargs.show:
        ignored = session.query(Ignore).all()
        if ignored:
            send(", ".join([x.nick for x in ignored]))
        else:
            send("Nobody is ignored.")
    elif cmdargs.delete:
        if not cmdargs.nick:
            send("Unignore who?")
        else:
            row = session.query(Ignore).filter(Ignore.nick == cmdargs.nick).first()
            if row is None:
                send("%s is not ignored." % cmdargs.nick)
            else:
                session.delete(row)
                send("%s is no longer ignored." % cmdargs.nick)
    elif cmdargs.nick:
        send("%s ignored %s" % (args['nick'], cmdargs.nick), target=args['config']['core']['ctrlchan'])
        send(misc.ignore(session, cmdargs.nick))
    else:
        send("Ignore who?")