Hello everyone,
I've recently been trying to set up an anti-flood bot for my channel. My channel is on freenode.net and I want my bot to be able to op via ChanServ, mute the flooder and then deop again via ChanServ, in that order. Here is the script:
on *:TEXT:*:#:{
inc -u4 %spam. [ $+ [ $nick ] ]
if (%spam. [ $+ [ $nick ] ] == 6) {
msg ChanServ op $chan
mute $chan $nick
msg ChanServ deop $chan
}
}
For some reason, my bot isn't executing the script commands in the right order. Instead of opping first, it executes the *mute command FIRST, and THEN ops and deops. I know this because this is what I get on my bot's screen:
* AFPbot: you're not channel operator
* ChanServ sets mode: +o AFPbot
* ChanServ sets mode: -o AFPbot
And of course, I result in having a failing anti-flood bot.
Can someone please explain why it does this and how I can fix it?
Regards,
Nicmavr