Earu / EasyChat

A modular Garry's Mod chat addon for both users and developers. (EOL 2025)
https://steamcommunity.com/sharedfiles/filedetails/?id=1182471500
GNU General Public License v3.0
90 stars 31 forks source link

PlayerSay gets called in CLIENT realm #101

Closed XAYRGA closed 1 year ago

XAYRGA commented 1 year ago

Shared files that have PlayerSay hooks in them and expect to perform serverside operations will error.

While it is neat to have PlayerSay called in client, its behavior should be mirrored to the base game, which is server realm only.

Earu commented 1 year ago

While I partially agree that it can be confusing to have PlayerSay on the client, having problems with it because you're adding a hook in a shared context often is an indicator of bad code or poor coding practices. A server side hook should only be added on the server and not shared. So really it's a non issue imo.

XAYRGA commented 1 year ago

While I agree that realm isolation is important it's not always necessary esp. for quick scripts.

Bad practice is in fact not isolating client and server realms.

But bad practice can also be introducing unexpected behaviors into the engine.

Alas, I respect your thoughts, and it is your codebase. This can be closed .