Basically what it does is if you have someone in a channel that is always deopping one and removing one individual from the channel users list the code will in fact deop the person trying to deop the individual remove them from the channel users list, add the person they deopped back to the channel users list and reop them. The code can be changed to fit the client level of the person trying to deop.
Thanks go ot to the following people for the assistance in writing this script:
Shinypant5
tye
[UniMoFos]BOT0000
on @*:DEOP:#channel: {
if (($nick == ChanServ) || ($nick == $me)) { halt }
else {
msg chanserv $chan deluser $nick
msg chanserv $chan deop $nick
msg chanserv $chan addop $opnick
msg chanserv $chan op $opnick
msg $nick Your message here
}
}