I seem to have a problem with my program knowing if the first item in the list equals 'opsTrue', or 'opsFalse', here is the code for my ban command. At the top of my program's code, along with a bunch of other things, I have, flags = ['opsTrue'].
Code:
    if user in access and msg[:4].lower() == tr+"ban":
        print "Processing command..."
        Log("Processing command...")
        if msg[5:6] == "*" and msg[-1] == "*":
            if msg[6:-1] in access or msg[6:-1] in safelist:
                pass
            else:
                if flags[0] == 'opsTrue':
                    for useritem in userlist:
                        if msg[6:-1] in useritem:
                            if useritem in access or useritem in safelist:
                                pass
                            else:
                                Queue(ban+useritem+" (*"+msg[6:-1]+"*)")
                                banned.append(useritem)
                                Queue(ban+useritem+" (*"+msg[6:-1]+"*)")
                                banned.append(useritem)
                                Queue(ban+useritem+" (*"+msg[6:-1]+"*)")
                                banned.append(useritem)
                                Queue(ban+useritem+" (*"+msg[6:-1]+"*)")
                                banned.append(useritem)
                elif flags[0] == 'opsFalse':
                    Queue(noops)
        if msg[5:6] == "*" and msg[-1] != "*":
            if msg[6:] in access or msg[6:] in safelist:
                pass
            else:
                if flags[0] == 'opsTrue':
                    for useritem in userlist:
                        if msg[6:] in useritem:
                            if useritem in access or useritem in safelist:
                                pass
                            else:
                                Queue(ban+useritem+" (*"+msg[6:]+"*)")
                                banned.append(useritem)
                                Queue(ban+useritem+" (*"+msg[6:]+"*)")
                                banned.append(useritem)
                                Queue(ban+useritem+" (*"+msg[6:]+"*)")
                                banned.append(useritem)
                                Queue(ban+useritem+" (*"+msg[6:]+"*)")
                                banned.append(useritem)
                elif flags[0] == 'opsFalse':
                    Queue(noops)
        if msg[5:6] != "*" and msg[-1] == "*":
            if msg[5:-1] in access or msg[5:-1] in safelist:
                pass
            else:
                if flags[0] == 'opsTrue':
                    for useritem in userlist:
                        if msg[5:-1] in useritem:
                            if useritem in access or useritem in safelist:
                                pass
                            else:
                                Queue(ban+useritem+" (*"+msg[5:-1]+"*)")
                                banned.append(useritem)
                                Queue(ban+useritem+" (*"+msg[5:-1]+"*)")
                                banned.append(useritem)
                                Queue(ban+useritem+" (*"+msg[5:-1]+"*)")
                                banned.append(useritem)
                                Queue(ban+useritem+" (*"+msg[5:-1]+"*)")
                                banned.append(useritem)
                elif flags[0] == 'opsFalse':
                    Queue(noops)
    else:
        if msg[5:] in access or msg[5:] in safelist:
            pass
        else:
            if flags[0] == 'opsTrue':
                if user in banned:
                    Queue(alreadyban)
                else:
                    Queue(ban+msg[5:])
            elif flags[0] == 'opsFalse':
                Queue(noops)
            else:
                pass
Most of this code you won't have to look at, but flags[0] either equals opsTrue or opsFalse. Just to test this out, at the top of my code, i made it equal opsTrue, so that this way if the bot has operator status it would ban, if it didn't it would say so. Can you find anything wrong with this?