I run a fairly decent size channel that requires a bot to be oped pretty much all the time.
Lets call Bot 1 "Asmodeus" and Bot 2 "Liana"
Now Asmodeus is the main bot. But sometimes it may go down do to ping timeout, netsplit or even peer. Now when this happends and I want Liana to be able to op itself and take over. Of course it'll have to have the same settings set (Users, same scripts loaded ect.) Liana will need to op itself temporarily until Asmodeus returns in which Liana will deop itself and let Asmodeus resume.
The logic is that Liana will only deop herself when Asmodeus is opped. Whether he is opped when he joins, or if he's opped if he's in the channel since a long time we dont care.
One bot will deop, if the other bot is op. This is only for Liana. For Asmodeus you can do the same tcl, by replacing the nicks in the string equal and matching functions and by placing them in Asmodeus.
And when Liana get d/c and joins the room and Asmodeus is there. Liana doesn't deop.