can be used to check if the mode of someone changed, in example if your channel bot gets deopped, just compare if its -o and if the nick is the nick of your bot, if both match, reop.
nevertheless I wouldnt do it like this to be honest since both bots can be deopped at the same time, or lets say within a period of a time the 2nd bot wouldnt be able to do anything at all.
so my suggestion would be to keep that one bot, user a mode bind as above, and if your bot sees that it has been deopped just pushmode +o $botnick and thats it. operoveride its called
In "normal" scenarios, you'd have two or more eggdrops linked in a botnet, preferrably sharing userfiles. You'd then use some "botnetop" extension (several available, including the getops.tcl script included in eggdrop's source distributions, and the botnetop and getops modules available from ftp.eggheads.org).
Since most, if not all ircd's support multiple mode changes in a single command, a malicious user would be able to deop atlest 3 bots at once, with some servers as many as 6. To be safe, you'd generally need atleast one more opped eggdrop, but the more the better.
Of course, the best protection is not opping these malicious users in the first place.
Now, you're using a private server. That changes the picture somewhat, as you are in control of the server. Generally, ircd's don't grant the server admins abilities such as "can't be deopped" or "op myself" - yet some arcane servers do. What you'll always have access to, is the KILL command, as well as G/K-lines and i-lines, which will prevent a malicious user from doing much further harm, once detected.
Since you did not state what kind of server you are running, it's hard to say what extended features might be available to protect your eggdrops or channels..