StrangeLoopGames / EcoModKit

Eco Modkit
https://docs.play.eco
69 stars 25 forks source link

Add OnChatMessage to ChatManager #30

Open samlander25 opened 3 years ago

samlander25 commented 3 years ago

Allow modders to intercept chat messages to be proofed/altered before reaching the chat UI. Gives modders the ability to implement custom profanity filters / ranks prefixes / roles / etc.

Can also open the door to automatic translation services and custom multiserver/db controlled mute etc.

Conchipedia commented 3 years ago

wouldn't that leave it a bit open to altering someone's message to appear as something else entirely? so the person could be in a lot of trouble for appearing to say something they didn't? Example: Original: I really enjoyed talking to you the other day thanks for helping Edited: I really hated talking to you the other day thanks for nothing

samlander25 commented 3 years ago

Yes Conchipedia, that would open the door for a mod to interject words, and if a mod were created for such a malicious purpose, im certain it wouldnt keep a loyal player base for long. Just as there are a million things we can do to screw over the players with the rest of the power modding gives us, but that's not the focus of this. OnPlayerChat is a pretty standard event, and using spigot minecraft as the example here it's the reason they have translation plugins, chat games, profanity filters and more. 2 active projects I want to do for my server involve both adding prefixes for citizen roles, as well as porting over a chat trivia game. Neither are currently approachable.

If this event becomes a reality, I'll personally port over the google translate plugin from minecraft as well so we can further increase communication and collab between players.

In summary, i dont believe that the event will be used for evil. Our modding community self polices very well and if a mod does appear that makes nefarious use of an event like this im pretty sure it would be shunned pretty quick.

MonzUn commented 3 years ago

I agree with Samlander, we can do so many horrible things already if we want to, but if we did, no one would want to use the mods and Dennis would bring out the hammer ^^

Still, in the case it's not possible for that reason, we could also settle for the option to prepend or append to a message.

TazMatic commented 3 years ago

Yeah this doesn't open any attack vectors and feels like it was supposed to be a thing anyways. In 8.3.3 using reflection this was already possible and when harmony works with 9.0 it will be possible through that as well

Conchipedia commented 3 years ago

just was being Mr Negative, someone has to be ❤️

samlander25 commented 3 years ago

I appreciate devils advocate Conchipedia :) Im just really stoked with the idea of chat trivia.. im looking for ways to engage our user base and give them more things to do while they're waiting for their next star... having a chat trivia system just adds an extra element :)

TazMatic commented 3 years ago

Also 200iq, more comments looks like more demand lol

TheKye commented 3 years ago

The ability to manipulate the chat names etc can help other modders to further extend on it/ make different changes etc, a good example is the better chat in Rust, it allows for the extensions to manipulate how the user name is displayed, incognito admin modes and more this could in turn help with admins being able to play as a "different" user without people screaming admin abuse all the time when they just wanna play the game as well

*Edit, What i mean as a different user: they could use a command ie: /tempadmin key (would be like a passcode to enter admin mod) The user then becomes an admin and has a Different username that they might have pre-set, this would be more of a ruse then anything but i know alot of admins don't play because if they have to admin when they want to play as well, some people go nuts over alleged "admin abuse"

TazMatic commented 3 years ago

along with that ive always wanted a way for admins to go invisible, it would help catch cheaters so much

samlander25 commented 3 years ago

Potential Use Cases:

D3nnis3n commented 2 years ago

Moved to Modkit