防止网络聊天应用程序发送垃圾邮件的简单技术
我在这里有一个简单的自定义滚动聊天:( http://ninjawars.net - 本质上:ajax 聊天、php 后端、聊天消息的 javascript 列表(仅登录用户输入)可能会受到垃圾邮件的困扰。有哪些简单的系统可以防止垃圾聊天?
我已经实现的一件事(最低级别的保护):
- 忽略来自同一用户的连续重复消息。
我的其他想法:
- 将来自同一用户的连续消息添加在一起,而不是创建单独的消息行。 (实现相对简单,减少垃圾邮件的影响,但不能阻止垃圾邮件)
- 对于新用户,在一个用户发送一定数量的连续消息后阻止继续发送消息。 (实施起来相对简单)
- 由受信任的用户进行聊天审核(实施起来很复杂)。
是否有任何我应该了解的简单系统/算法来防止聊天消息垃圾邮件?
I have a simple, custom rolled chat here: ( http://ninjawars.net - essentially: ajax chat, php backend, javascript listing of chat messages, logged-in user input only ) that suffers from being able to be spammed. What are some simple systems to prevent spamming of a chat?
One thing (lowest level of protection) that I have already implemented:
- Ignore consecutive duplicate messages from the same user.
Other ideas that I have:
- Add consecutive messages from the same user together, instead of creating a separate message line. (relatively simple to implement, decreases the effect of spam but doesn't prevent it)
- Prevent continued messages after a certain number of consecutive messages from one user, for new users. (relatively simple to implement)
- Chat moderation by trusted users (complex to implement).
Are there any simple systems/algorithms to prevent chat message spamming that I should know about?
增加用户回复速度的延迟。因此,在每条消息发布后,将
next_reply_time
存储为 NOW + 1 秒的时间戳。如果他们在到达时间之前回复,请忽略它并给出“回复太快”警告,并将next_reply_time
设置为 NOW + 2 秒,依此类推。这样,如果它们堆积消息的速度太快,您将在更长的时间内忽略它们。这种延迟当然可以基于声誉。Put an increasing delay on how fast a user can reply. So after each message post store
next_reply_time
as a timestamp of NOW + 1 second. If they reply before the time has reached, ignore it and give a "Reply too fast" warning and set thenext_reply_time
to NOW + 2 seconds, and so on. This way if they stack up messages too fast, you'll ignore them for longer periods of time. This delay can of course be based on reputation.