I wouldn't have any idea where to start myself but I thought I would throw out an idea to the community for someone to consider.
As anyone that has used Mods or Plugins there are always those that may get around things that do annoy server owners or/and other players.
I propose a mod that asks the question: Is the client within respectable range of differences?
What I mean is as thus:
1)Some mods are Client Only
2) Some are Server Only
3) Some are required for both sides
4) Can it be Monitored?
Modlock would have a special affinity for PERFECTION! If a client even attempts to join a server with any real differences not allowed it would plainly say " You are Out of Bounds of Perfection: Contact the Server Owners if you Believe this is a Flaw." - Insert Borg here!
What it does:
It first off looks to see if Modlock is in Client and if not auto reject: "ModLock kicked you: Please add to mods: ModlockVersionInQuestion"
It 2nd Quickly looks at mods installed on Client(by class code not name).
- It legitimately reads the whole mods list of the client and if something is wrong such as "XRay class code Present", or "OP hacker class code Present" The player is auto rejected as the server doesn't have those in its mods, Ignore or Exempt folder. It won't say that but it will say: "You are Out of Bounds of Perfection: Contact the Server Owners if you believe this is a Flaw."
- If any of the mods have classes with code not present you're rejected Weather you changed Xray name to Botania or not. It's the code Modlock is looking at.
Why can't I join?:
1) The Exempt Folder doesn't include the Jar
2) The Ignore Folder doesn't have Forge Essentials(as an example)
What does this mean?:
Exempt Folder - Only these mods are Allowed:
Say a server owner will allow Damage Indicators -11-11-11 they can add it to an Exempt Folder(Owners Job not Modlock) and if a person were to try and join with Damage Indicators -11-11-12 it would reject the user but not cause of the name but cause of the Code Even if they renamed it to Damage Indicators -11-11-11 you would still be rejected.The new Jar would be required to be put in Exempt Folder to allow it which is why Modlock says: "You are Out of Bounds of Perfection: Contact Server Owners if you believe this is a Flaw" Its what it does. Helps the Player and Server Owners!
That's where Server Mods should go: It tells Modlock "This Mod is not required, please ignore it". Modlock will Ignore the mod.
Mind you a server owner may of goofed up or not considered something and that is why Modlock would exist. A player could relay information like maybe Damage Indicators -11-11-12 came out and they would like to use it vs the 11. The server owner could just get the mod from the Curse Page or forums(however the mod is done) and put it in exempt so either can be used. Accepting a Mod from a Player may be unwise of course which is why Curse is nice. You know its the mod you want from the author. If they attempted to join with the 12 and it had different code... sucks for the player in question. Who knows why its different but it I guess wasn't the real Damage Indicators -11-11-12.
I am not sure if this mod may come to be but I feel it could be a brilliant add to the world. I know there is a mod that will allow a player to not be harmed till they are fully in server so any wait time would void the harm. It would just take maybe a minute more while Modlock looks at the code. It wouldn't need to initialize anything... just read... shouldn't take long right? Either way... If someone does make this, I would love to know. It could become the Most Core Mod of all time after all!
But The Server Owner Doesn't Have a WEBSITE!:
It shouldn't be a problem but it might be? If a Player can't join either the server pack or client pack aren't the same or the client added mods that aren't suppose to be present.
If its the former: If possible maybe the Modlock can have a custom message vs the borg like thing saying: Modpack -11-11-11 as an example possibly under the borg thing :) as who doesn't love borg XD.
If its the latter: Just remove the mods, get in server and talk to the admins/owner.
I will contact my friend Nividica to see what he thinks as he I am sure could do it if its possible!
If possible... this could also be a brilliant plugin. Not sure what all is possible with plugins but I am fairly sure a mod could be made... I still have my mods I am working on... I just thought of this out of the blue as a brilliant core mod that prevents people from using edited clients no one would want on their server. It would do SO MUCH! to make a Server more Secure. I am sure there are possible ways around it probably... maybe Modlock could also put in a Special Folder Changes to Server 'By the Day' If a new mod was added or altered it would relay it. What kind of setup it might have... I can't be sure. It probably shouldn't exclude server staff but maybe the owners/OPs... maybe not... why would they be using mods they don't accept? Maybe there is a OP exempt for minor things that clients don't need but an OP may for WorldEdit CUI or something.