Fama88 Posted August 12, 2016 Share Posted August 12, 2016 I hope this is the right section to ask this, but is there a mod that allows a server admin to have a list of banned words that will automatically be censored in the chat for everybody, both in the lobby and in game? Thanks in advance. Link to comment Share on other sites More sharing options...
rezecib Posted August 12, 2016 Share Posted August 12, 2016 @Fama88 I don't believe so. If someone does want to make a mod like this, though, I think the way you'd have to do it would be with an all-clients mod that intercepted networking.lua's Networking_Say function and checked the message parameter. The rest of the chat appears to go through the game's C++ code, and come out of that at each client through that function. And then of course you'd need to write a GUI for the admin, which would be the most annoying part. Link to comment Share on other sites More sharing options...
CarlZalph Posted August 12, 2016 Share Posted August 12, 2016 18 minutes ago, rezecib said: @Fama88 I don't believe so. If someone does want to make a mod like this, though, I think the way you'd have to do it would be with an all-clients mod that intercepted networking.lua's Networking_Say function and checked the message parameter. The rest of the chat appears to go through the game's C++ code, and come out of that at each client through that function. And then of course you'd need to write a GUI for the admin, which would be the most annoying part. Yeah, the only way to hook say messages and intercept to edit them is on the client end. By the time the server has the function for its own usage the say was already networked to the clients and its only use is for logging/rebroadcasting purposes. Which being on the client end one could get around it by having a hook for the hook that calls the original function instead, negating the filter. This sort of thing is a feature we'd have to ask the devs to add in, a generic chat function that gets called from the C side that goes to the LUA side for edits, then the C side takes the augmented string value and goes back to C land for networking. Which then goes back to the LUA for the logging/rebroadcasting purpose function. Might be able to hook the chat GUI and edit the strings as they appear on the client end to prevent the mentioned hook-of-hook, though I'm not familiar with this portion of the code enough to say. Link to comment Share on other sites More sharing options...
rezecib Posted August 12, 2016 Share Posted August 12, 2016 (edited) 8 minutes ago, CarlZalph said: Which being on the client end one could get around it by having a hook for the hook that calls the original function instead, negating the filter. I don't think one needs to worry about players getting around this to "un-censor" the chat. But it could definitely be done much more neatly and securely by the devs. Edit: Actually, much simpler than a GUI would be to just do some AddUserCommands for it. Edited August 12, 2016 by rezecib Link to comment Share on other sites More sharing options...
Fama88 Posted August 13, 2016 Author Share Posted August 13, 2016 (edited) Thank you for your answers, in the end i made it myself, but both the answers were very helpful to make me understand what to do. Edited August 13, 2016 by Fama88 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now