Open Caelish opened 8 years ago
I see this more as a mod feature.
Yep, I agree. Should we do it in OpenJK modcode?
That makes sense, but could we at least add a cvar for custom text strings that fail userinfo validation as non-mod thing? I suppose I'm just in a weird position (seeing as I host a bazillion of servers each using different mods), but at the very least having that as a non-mod feature would make my life considerably easier.
Something like...
set sv_userinfofail "\rate\25000;\name\bob;\name\s*nta;etc;etc;e*t*c;etc;etc"
...or simply a plain text file containing custom userinfo validation matches.
Alternatively the filtering could be moved to engine entirely.
Mods may definitely wish to have their own userinfo validation, especially if there's a possibility of incompatibility
So move the core non mod specific portions to engine and the rest can be up to mods.
So modcode should match patterns specific to the modcode, engine should have size + format checking and then user-specified filter strings. Should investigate ways to allow admins to create rules, combining operators and algorithms. Or just a polymorphic structure stored in a list like "i am a less-than rule" operating on "numCharactersInValue" and "64". Could look into how Wireshark applies its filters
Just make Icarus powerful enough to be able to express filtering rules in it. :stuck_out_tongue:
Joking aside, the most general way would be an actual scripting language, though maybe not icarus.
One feature I'd really really like to see in the OpenJK server-side is the ability to run predefined actions on players who have a specific text string in their userinfo. For example, I'm currently hosting someone using a number of hacky and horrible scripts to automatically log the IPs of players with specific names.
Some of the things I might want to do depending on a completely arbitrary text match in a player's userinfo include:
Ideally, support for wildcards in userinfo and several actions would be nice, along the lines of...
Check userinfo -> if match for ✱\name\bob\✱\rate\4000\✱ -> log the player's userinfo & IP and then ban them.
This would save me huge, huge amounts of headaches. It could be used for several things, such as identifying or banning unwanted players using VPNs, providing debug info when someone messes up their userinfo with relation to userinfo validation, or just giving them a message relevant to them like the rate one.
As a simpler alternative in the meantime though, even being able to extend the existing userinfo validation with custom illegal text string matches of my own would be hugely useful.