Kampot Posted September 21, 2022 Report Share Posted September 21, 2022 (edited) Hello I'm investigating how to mute in session a player as host of the game. This would be general mute - it means all other players would not recieve from that person any message. (not autociv implementation where muting is only for local client) My investigation leads to Engine.SendNetworkChat() but there is not any option to exclude specific player. Which leads me to conclusion such feature does not exist. It p points to Engine so most likely not "moddable inside javascript". Can you confirm my research? If such feature would be "wanted" what steps I need to do to bring it into reality? @Stan` @Emperior Edited September 21, 2022 by Kampot Quote Link to comment Share on other sites More sharing options...
Stan` Posted September 21, 2022 Report Share Posted September 21, 2022 @smiley might know more. In the mean time you might want to look at the in game chat commands there might be a way to check for a given nick and not display their messages. So you'll still receive them but they won't bother you. Quote Link to comment Share on other sites More sharing options...
smiley Posted September 21, 2022 Report Share Posted September 21, 2022 The process is currently like this: NetClient sends a CChatMessage to the NetServer. NetServer broadcasts the CChatMessage to every connected NetClient. What you would need to do is add another message type CNetMuted, handle it and keep track in NetServer. An intermediate step would then come in between the two above steps where you would just drop all CChatMessage from muted NetClients. Its possible to translate the current kick/ban code to mute pretty straightforwardly as it should behave identically apart from what message types are ignored. Yes, your research is accurate. It cannot be done just by JS, needs some engine network changes. 2 Quote Link to comment Share on other sites More sharing options...
Kampot Posted September 21, 2022 Author Report Share Posted September 21, 2022 (edited) @smileywould you help us to prepare that engine part? I could test it and enhance js part. I guess it would be beneficall for future 0ad versions as there is some demand for host to have some tools to control the game. I agree kick/ban are good ones, but also "too hard" and sometimes just mute a person does the job. Edited September 21, 2022 by Kampot Quote Link to comment Share on other sites More sharing options...
smiley Posted September 21, 2022 Report Share Posted September 21, 2022 There is a ticket for it at https://trac.wildfiregames.com/ticket/5423, we should definitely have this eventually. Hopefully for A27. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.