聊天:访问频率限制

This commit is contained in:
luying
2022-01-10 14:30:09 +08:00
parent 00c50ebe98
commit ac51a2302e
4 changed files with 47 additions and 17 deletions

View File

@@ -1,13 +1,14 @@
{
"PROTECT_API_INTERVAL": 500,
"PROTECT_API": [
"chat.chatHandler.sendGroupMessage",
"chat.chatHandler.sendPrivateMessage",
"battle.barrageHandler.sendBarrage"
],
"API_IS_CLOSE": 0,
"CLOSE_APIS": [],
"CLOSE_LOGIN": 0,
"CLOSE_LOGIN_WHEN_ONLINE_MAX": 1,
"MAX_ONLINE_USER_COUNT": 5000
"MAX_ONLINE_USER_COUNT": 5000,
"PROTECT_API": [
{ "id": 1, "desc": "世界聊天", "route": "chat.chatHandler.sendGroupMessage", "param": { "channel": "world" }, "interval": 20000 },
{ "id": 2, "desc": "军团聊天", "route": "chat.chatHandler.sendGroupMessage", "param": { "channel": "guild" }, "interval": 5000 },
{ "id": 3, "desc": "组团聊天", "route": "battle.comBattleHandler.sendTeamMsg", "param": {}, "interval": 5000 },
{ "id": 4, "desc": "私聊", "route": "chat.chatHandler.sendPrivateMessage", "param": {}, "interval": 5000 },
{ "id": 5, "desc": "发送弹幕", "route": "battle.barrageHandler.sendBarrage", "param": {}, "interval": 5000 }
]
}