Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6025051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:14:44+00:00 2026-05-23T04:14:44+00:00

I am working on a flood control for a chat system, one of the

  • 0

I am working on a flood control for a chat system, one of the ideas was to check how equal the past message is based on the newest message a member has sent within X minutes.

So if the member’s lastest message was sent with 5 minutes of his past message it will check how equal the past message is against the latest message he sent, if that hits 80% or more he would be not be able to talk for a while.

Problem is I don’t know how this sort of algorithm would look like and I am not sure if it would be an efficient approach either…

Let’s go to the facts, user sends:

[00:00:01] MemberX: Hi everyone !
[00:00:02] MemberX: Hi everyone ! MUAH
[00:00:03] MemberX: Hi everyone ! 1

So in the above context the user would have his talking access removed for X minutes.

I guess I could checksum the message which would work for sequential messages like those where text is add at the end.

How would I calculate the percentage of match?

Out of the byte length of the past message against the byte length of the latest message that matched?

Example:

  • past message 10 bytes
  • latest message 14 bytes
  • checksum matched up to 9 bytes: (9/10)*100 = 90%

Now let’s go a little harder:

[00:00:01] MemberX: Hi hey everyone !
[00:00:02] MemberX: Hi everyone ! MUAH
[00:00:03] MemberX: Hi 123 everyone !

In this second case checksum would fail and would not be usable at all, I believe.

Is there a good algorithm to catch flood like that? I don’t want to catch 100% of it but at least a small percentage to make the room cleanner.

The first part of it would work for a lot of abusers but some of the smarter folks would think of the 2nd way there is probably a lot other ways too, this is just an initial idea of things I could implement.

I don’t want to restrain all users from talking with a flood time limit as most of them do type fast. I just want to catch people sending repeatable text over and over within a small range of time.

So my question is what would be a good algorithm to overcome this sort of flood?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:14:44+00:00Added an answer on May 23, 2026 at 4:14 am

    Many IRC servers use a “Leaky Bucket” approach to throttle users to a constant rate. They keep track of the delta-time between the user’s last messages sent and use that to calculate a “rate”. This is often implemented as a per-user queue of messages to be sent. If the user goes above the rate they are throttled, unless they exceed the rate by a given amount at which point they are banned.

    Another common approach on IRC is to simply keep track of the last N messages, and if some threshold of repeatability (i.e. the same message over and over again) is exceeded to kick/ban the user.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I working on a food database, every food has a list of properties (fats,
I am working on a project which features one database table looking like this
I am working on a project under which i am going to control lights
I'm actually working on a PHP project that will feature a user system (Login,Register,Send
Currently i am working on a project where i need to match people based
I am currently working on a neural network based approach to short document classification,
When working on the early stages of a console-based Python remake of the classic
I'm working on a web-based tool which streamlines the work we do at my
I'm working on a simple Flash game for school. In one level, multiple enemies
How can I determine, if client browser supports sessions? I'm working on a anti-flood

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.