Enforcing desysopping by a moderator
Please summarize the below thread in the editing box. You may use any wikitext in your summary. When you finish, click "Save page".
With $wgRevokePermissions you could set up a group that revokes all the sysop rights and make it so only mods can add and remove it. Then it wouldn't matter if another sysop undid the desysopping, because the revoking group would override the sysop rights.
So for example:
#Because of https://bugzilla.wikimedia.org/show_bug.cgi?id=23934 (fixed in MW1.17), you need a dummy wgGroupPermissions entry $wgGroupPermissions['sysoprevoke']['block'] = false; $wgRevokePermissions['sysoprevoke']['block'] = true; $wgRevokePermissions['sysoprevoke']['delete'] = true; #etc...
The only problem is that I don't think you can prevent the user from changing user rights, since sysops don't have the full userrights right, their ability to make people sysops is governed by $wgAddGroups and $wgRemoveGroups, and I don't think there's a way to revoke that with a second group.