Skip to content
This repository has been archived by the owner on Aug 10, 2022. It is now read-only.

[Request] Anti flood #13

Open
lostandconfused opened this issue Jan 12, 2015 · 15 comments
Open

[Request] Anti flood #13

lostandconfused opened this issue Jan 12, 2015 · 15 comments

Comments

@lostandconfused
Copy link
Contributor

Any chance of auto kick for spam being implemented?

@Efreak
Copy link
Member

Efreak commented Jan 20, 2015

This is already planned, I just don't have the time right now.

@lostandconfused
Copy link
Contributor Author

Good to know, cheers.

@Efreak Efreak self-assigned this Feb 8, 2015
@Efreak Efreak reopened this Feb 8, 2015
@Efreak Efreak added this to the 2.3.0 milestone Jun 25, 2015
@Efreak Efreak added the Plugin label Jun 25, 2015
@Efreak Efreak modified the milestones: 2.4.0, 2.3.0 Jul 18, 2015
@Efreak
Copy link
Member

Efreak commented Aug 20, 2015

how does e2c51ed look to you? I haven't tested it yet, but it should be tweakable enough that someone can set it up the way they like it. It also has support for words you dislike; you can increase someone's score (a bad thing) when they say them.

  • Whenever someone in a chat says something, their score for that group gets increased
  • Whenever someone in a chat says a 'badword', their score gets increased by the amount specified for that badword
    • if the amount is null, it just applies the per-message penalty again
    • If you use this, you'll probably want to change the default warning message.
    • Use this to prevent people from spamming emoticons or items if you like
      • inventory items match /(https?\:\/\/)?[A-Z\.]+\/(id|profiles)\/[A-Z0-1_-]+\/inventory\/\#[0-9_]+/i
      • emoticons match /\:[A-Z0-9_-]+\:/i
  • Is the score high enough to get warned, kicked, banned, added to the global ignore list, or tattled on to the admins? time to do that.
    • If someone gets banned or ignored, set a timer to unban/unignore them.
  • On interval, we lower everyone's scores for every group.

Everything is customizable, from the penalties to the scores.

TODO:

  • when multiple regex matches found, apply the penalty multiple times. probably use str.match(/RegExp/ig).length instead of str.indexOf(str)
  • when the number of unique characters in the message is significantly lower than the total length, apply a penalty. (much easier than detecting patterns, and will grab keyboard nonsense as well)

@lostandconfused
Copy link
Contributor Author

Works well for multi line stuff, probably not going to use the rest so not tried them. One thing it sends the warning message for every line after the warning is first sent which leads to it spamming the spammer if they post really fast, would be nice to have a timeout on it sending the message.

@Efreak
Copy link
Member

Efreak commented Sep 9, 2015

spamming the spammer

This is a problem? 😸

@lostandconfused
Copy link
Contributor Author

As amusing as it is, a little.

@Efreak
Copy link
Member

Efreak commented Sep 10, 2015

I'll take a look at it later, see if I can use disableForTimeout without it affecting anything other than the sendMessageAfterDelay functions.

@lostandconfused
Copy link
Contributor Author

Tried the ban, it logs that it's banning but doesn't actually ban

@Efreak
Copy link
Member

Efreak commented Sep 12, 2015

Does the bot have permission to ban users? Check steamcommunity.com/groups/your_group/permissionsEdit and steamcommunity.com/groups/your_group/membersManage to make sure. You can also check your group history page (steamcommunity.com/groups/your_group/history) to see if the ban went through.

@lostandconfused
Copy link
Contributor Author

Ok I'm just an idiot and forgot to give officers the power to ban in my test group facepalm

@Efreak
Copy link
Member

Efreak commented Sep 13, 2015

👍

@lostandconfused
Copy link
Contributor Author

Could the badwords maybe get a exact and non exact option?

@Efreak
Copy link
Member

Efreak commented Oct 13, 2015

define what you mean bvy inexact, please? Apologies for not responding to this, somehow I never saw it.

@lostandconfused
Copy link
Contributor Author

For example if "bot" adds a point "robot" wont add a point, just the "exact:true" option.

I can't actually remember why I wanted it so don't worry about it.

@Efreak
Copy link
Member

Efreak commented Oct 17, 2015

Add a space. I'll be adding regex support soon, so you'll be able to specify word boundaries at that point. In the meantime, you can set your badword to " bot" instead of "bot" and it will only apply if there's a space before it.

Regex support will probably require a change in the way the config works, as I don't believe you can use a regex as an object property name, only as a value.

@Efreak Efreak modified the milestones: Probably never..., 2.4.0 Aug 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants