Page MenuHomeWildfire Games

Lobby chat spam filter
Needs ReviewPublic

Authored by ffffffff on Dec 24 2017, 12:37 AM.

Details

Reviewers
elexis
Summary

Maybe also for gamesetup and ingame why not.

Pls discuss.

At the moment: Message contingent for max. three messages in one second. Counting every message with spam-counter. Reduce spam-counter every second by timer. When hit three messages count, dont let the arriven 4th message through and add +3 to the spam counter. So you need to wait 4 seconds again to spam counter down to 3 again and can write a message. Test. Discuss please.

Message spam hit

Test Plan

test

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

ffffffff updated this revision to Diff 4921.Dec 24 2017, 12:37 AM
ffffffff created this revision.
ffffffff edited the summary of this revision. (Show Details)

Ok. D512 looks equal. Do you want to see, if my code works better? Not hard : )

Can't be hard to make easy filter.

With raising counter.

Your code is much shorter at least.
The previous code was broken too, it didn't filter equally for all clients, so some clients saw some messages, other clients saw other messages, people didn't know what was going on.

Filtering in the GUI should still be considered insufficient, because pidgin trolls like you can still spam messages and legitimate pidgin users like user1 are still getting spammed.

The filtering should be done at the xmpp server level, which is why I had looked for some configuration options, see that revision.
Perhaps there are new ejabberd config option nowadays or some patches around.
But I couldn't find something useful.

Besides, was there anyone who spammed more than 20 messages more than once per year?

user1 added a subscriber: user1.Dec 24 2017, 5:58 PM

Besides, was there anyone who spammed more than 20 messages more than once per year?

In short, yes. It happens like weekly. I didn't test this but I like it and I feel it will actually help us out.

user1 awarded a token.Dec 24 2017, 5:59 PM

min_message_interval is insufficient?

This option defines the minimum interval between two messages send by an occupant in seconds. This option is global and valid for all rooms

mapkoc added a subscriber: mapkoc.Dec 25 2017, 2:47 AM

Maybe something in this code could be of use
https://github.com/cockroach/pidgin-privacy-please

+1 for min_message_interval for the lobby, because that does enforce such a limit on server side, thus not allowing a player to remove it.

Mostly I don't want to add unneeded complexity to the lobby.js file that is never ideal and needs to be maintained and broken by concept (because it's the servers task by design).
If we agree, we can add a comment to lobby.js stating why we don't have a filter here so we won't have the debate for a fourth time.

@user1 how about a 1, 2 or 3 second delay between messages?
I believe at some point it will be hard to distinguish spam from people who just have much to say.
For the same reason exponential timeouts aren't benefitial, are they?

I feel we miss ingame and gamesetup chat spam filter as well, when using server side spam filter...

If we keep this code central and across these guis for chat spam filter then it may be fine as we get with this also a contingent of messages that can be send quickly. if contingent is full its considered spam. As f.e. 3 or 4 messages can be send fast in lets say up to 3 seconds. Then spam counter counts every one second down and frees up contingent for messages. Or something similiar. So if somebody has to tell much its no harm. But after sending 4 or 5 messages in to short time and to often its spam..

In that case it should still be server-side right? Otherwise clients joined at different times see different set of messages.

incase we dont get serverspam filter this can be used client js way

I agree with @elexis, we need to use server-side spam-filter. It's really the better solution. We need something like a jabber plugin.

Lol i also agree with elexis but i dont see the spam filter....

lyv added a subscriber: lyv.EditedDec 22 2018, 2:01 PM

(For the record, this is almost exactly what ejabberd config min_message_interval does.)