1) Both are in the channel.
2) User B kicks you.
3) Userr B kicked you, you are out of the channel, and then mIRC gets informed.
4) You try to re-kick, but can't, since you are no longer in the channel.
So, solution would that you save the kickers nick, and try to kick him once you regain op status again.
That is why I was wondering if I can set a timer on the script. I've done it before but I forget how.
What you described is the problem I figured was going on.