Page 1 of 2

Muting/banning player ingame

Posted: 09 Apr 2012, 01:38
by Jazcash
Is there anyway to ban a player from a game in such a way that he can't reconnect to the game until the ban is lifted?

Failing that, is there anyway to mute a player ingame?

Zangeeph is annoying.

Re: Muting/banning player ingame

Posted: 09 Apr 2012, 18:57
by Carpenter
Jazcash wrote:Failing that, is there anyway to mute a player ingame?
+1 for this one.

Re: Muting/banning player ingame

Posted: 09 Apr 2012, 22:16
by knorke
Failing that, is there anyway to mute a player ingame?
I think not engine side, but adding that to chat console widgets should be possible.

Re: Muting/banning player ingame

Posted: 09 Apr 2012, 23:22
by Funkencool
+1 If it could, that would be neat. I have always very much appreciated the ability to mute trolls in modern console FPS, and it would probably help with the Trolling/ban complaints here as well.

Re: Muting/banning player ingame

Posted: 09 Apr 2012, 23:26
by Jazcash
knorke wrote:
Failing that, is there anyway to mute a player ingame?
I think not engine side, but adding that to chat console widgets should be possible.
I dunno, I think engine side would kind of make sense. When would a game ever not want this function? Just a nice /ignore {playername} is simple enough.

Re: Muting/banning player ingame

Posted: 09 Apr 2012, 23:41
by smoth
because I might want to still log the shit an ignored player was saying.

Re: Muting/banning player ingame

Posted: 09 Apr 2012, 23:43
by Jazcash
smoth wrote:because I might want to still log the shit an ignored player was saying.
That sounds kind of like a feature that would seem nice but would never get used.

Re: Muting/banning player ingame

Posted: 09 Apr 2012, 23:50
by smoth
Truthfully I am still unsure why mute is not a widget thing. Seems like ban could be a gadget thing..

Re: Muting/banning player ingame

Posted: 11 Apr 2012, 01:28
by knorke
Jazcash wrote:
knorke wrote:
Failing that, is there anyway to mute a player ingame?
I think not engine side, but adding that to chat console widgets should be possible.
I dunno, I think engine side would kind of make sense. When would a game ever not want this function? Just a nice /ignore {playername} is simple enough.
Yea, ultimately it would be better engine side. But it would take longer, because there are fewer devs and release are further apart. Some things are technically possible "today" already:

-One could add a mute-button to advanced playerlist, which does a Spring.SendLuaUImessage thing to the red_console.lua (or what its called) to not show messages from the muted player.

/ignore {playername} would need autocomplete (not sure if that is possible unless you redo the "enter chat" thing) for trolltastic long playernames. (with button it would not be needed anyway)

-kicking from game might be possible by having a gadget that executs Spring.SendCommands ("quit") (?) when recieving a message to do so.

Preventing rejoin is not possible I think..of course you could just kick again but thats not so nice. This would need change in engine(?) or autohost (?)

Re: Muting/banning player ingame

Posted: 11 Apr 2012, 17:52
by knorke
Jazcash wrote:Just a nice /ignore {playername} is simple enough.
I added that to BA's red console chat: (original widget by Regret)
Image
The "blocked message by xxx" was just for test. (put it back in if you want to go all "lalala i cant hear you")

Works like this:
/mute playername
mutes a player
/mute playerA playerB
mutes playerA and playerB (seperate by space)
/unmute playername
unmutes a player
/unmute
unmute everybody
:arrow: must use correct spelling of names :!:

http://pastebin.com/kGqLkAME
It is a bit hacky...the parts where I made changes are marked with --mute--
In F11 it shows as "Red Console (knorke mute test)"
So disable the original.
I only tested briefly with a replay so report back how fail it is.

Re: Muting/banning player ingame

Posted: 11 Apr 2012, 19:12
by Jazcash
knorke wrote:
Jazcash wrote:Just a nice /ignore {playername} is simple enough.
I added that to BA's red console chat: (original widget by Regret)
Image
The "blocked message by xxx" was just for test. (put it back in if you want to go all "lalala i cant hear you")

Works like this:
/mute playername
mutes a player
/mute playerA playerB
mutes playerA and playerB (seperate by space)
/unmute playername
unmutes a player
/unmute
unmute everybody
:arrow: must use correct spelling of names :!:

http://pastebin.com/kGqLkAME
It is a bit hacky...the parts where I made changes are marked with --mute--
In F11 it shows as "Red Console (knorke mute test)"
So disable the original.
I only tested briefly with a replay so report back how fail it is.
Epic! That's an awful lot of code you're rockin' there. I wanna try and implement this into IceUI, as they're different frameworks would it be an easy job? Or would it take quite a bit of unique code I'd have to write myself?

Re: Muting/banning player ingame

Posted: 11 Apr 2012, 19:34
by knorke
no, no I did not write all that.
It is the gui_red_console.lua from BA, I only added the muting which was just some dozen lines.

Yes, basically it would work the same for IceUI. (did not look at it though)
Find the part where a new message is added to chat, if the player is muted, do not add the message. If you have a link to IceUI I could probally add it.

Re: Muting/banning player ingame

Posted: 11 Apr 2012, 20:06
by Jazcash

Re: Muting/banning player ingame

Posted: 12 Apr 2012, 17:07
by Jazcash
I mean, ideally the lobby protocol should have the same sort of features as a channel should plus more. Like in a channel, you can mute a player for a number of minutes. Would be nice if that was possible in a battle/battle lobby too.

Re: Muting/banning player ingame

Posted: 12 Apr 2012, 19:49
by Degenerated5
Jazcash wrote:the lobby protocol
Hahaha, oh wow.

Re: Muting/banning player ingame

Posted: 12 Apr 2012, 20:06
by Jazcash
Sorry, meant server protocol. If that's even the right thing. I just guess most of the time.

Re: Muting/banning player ingame

Posted: 13 Apr 2012, 13:45
by knorke
just noted that it should actually be "ignore" and not "mute" but w/e.
open widgets\IceUI\console.lua and replace the content with this:
http://pastebin.com/imDTNnYc
works the same as the red gui version.

Re: Muting/banning player ingame

Posted: 14 Apr 2012, 15:05
by very_bad_soldier
One problem still remains: the sound effect *bing* still remains when a muted player says something which is a bit irritating. Any idea how to prevent that?
I guess that sound effect is from the engine's console. Best would be to disable that entirely and play a sound effect from within the widget.

Re: Muting/banning player ingame

Posted: 14 Apr 2012, 15:17
by knorke
very_bad_soldier wrote:I guess that sound effect is from the engine's console. Best would be to disable that entirely and play a sound effect from within the widget.
yup. Those are the sounds: http://springrts.com/wiki/Sounds.lua#Re ... SoundItems
Mods could set them to silent/empty, then use Lua. As player maybe put ui volume to silent in springsettings?

Re: Muting/banning player ingame

Posted: 14 Apr 2012, 15:24
by Jazcash
knorke wrote:just noted that it should actually be "ignore" and not "mute" but w/e.
open widgets\IceUI\console.lua and replace the content with this:
http://pastebin.com/imDTNnYc
works the same as the red gui version.

<3