Jump to content

in-gameplay / muting specific user


Kampot
 Share

Recommended Posts

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 by Kampot
Link to comment
Share on other sites

The process is currently like this:

  1. NetClient sends a CChatMessage to the NetServer.
  2. 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.

  • Like 2
Link to comment
Share on other sites

@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 by Kampot
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...