I'm having a big problem with this list, here's how the code is.
At the top I have,
Code:
flags = ['ops']
Later, under the commands section I have,
Code:
    # Kick
    if user.lower() in access and msg[:5].lower() == tr+"kick":
        if flags[0] == 'opsTrue':
            if msg[6:] not in userlist:
                Queue(nothere)
            else:
                if msg[6:].lower() in access or msg[6:].lower() in safelist:
                    pass
                else:
                    Queue(kick+msg[6:])
        elif flags[0] == 'opsFalse':
            Queue(noops)
        else:
            pass
tr is trigger, the user I'm testing with is in access, Queue() sends the data inside of it, and Queue(noops) sends "I do not have ops." Now, here's what determines if the bot has ops (operator status) or not:
Code:
def event_flags(username, uflags):
    print "FLAGS: "+username+", "+uflags
    Log("FLAGS: "+username+", "+uflags)
    if username.lower() == bnetuser.lower() and uflags == 2:
        flags[0] = 'opsTrue'
    elif username.lower() == bnetuser.lower() and uflags == 18:
        flags[0] = 'opsTrue'
    else:
        pass
    if username.lower() == bnetuser.lower() and uflags != 2 or username.lower() == bnetuser.lower() and uflags != 18:
        flags[0] = 'opsFalse'
    else:
        pass
bnetuser is the account you logged on with, now, when the bot connects into the proper channel and get's ops, Python prints out, FLAGS: Yegg, 2. 2 means it has ops. This sets flags[0] to 'opsTrue', telling the commands that it has ops. Now when I try kick, as for EVERY other command, I get this:
Code:
[21:16:23] <CleanSlateBot> !kick bob
[21:16:23] <*Yegg> I do not have ops.
[21:16:23] <*Yegg> I do not have ops.
First of all, it shouldn't send twice, and it should have said, bob is not in the channel. Anyone know what's wrong with this?