mpp-server-dev2/config/ratelimits.yml

92 lines
2.6 KiB
YAML
Raw Normal View History

2024-07-23 11:54:36 +02:00
# Difference between rate limits and rate limit chains:
# Rate limits will not allow anything to be sent until the rate limit interval has passed.
# Rate limit chains, on the other hand, will allow messages to be sent until the rate limit chain's limit has been reached.
# This is useful for rate limiting messages that are sent in rapid succession, like note messages.
# This is also the basis for note quota, however that is handled in a separate way due to the way it is implemented.
# Rate limits for normal users.
2023-09-11 06:01:49 +02:00
user:
2024-07-23 11:54:36 +02:00
# Rate limits
2023-09-11 06:01:49 +02:00
normal:
2024-07-23 11:54:36 +02:00
a: 1500 # Chat messages
m: 50 # Cursor messages
ch: 1000 # Channel join messages
kickban: 125 # Kickban messages
unban: 125 # Unban messages
t: 7.8125 # Ping messages
+ls: 16.666666666666668 # Channel list subscription messages
-ls: 16.666666666666668 # Channel list unsubscription messages
chown: 2000 # Channel ownership messages
hi: 50 # Handshake messages
bye: 50 # Disconnection messages
devices: 50 # MIDI device messages
admin message: 50 # Admin passthrough messages
# Rate limit chains
2023-09-11 06:01:49 +02:00
chains:
2024-07-23 11:54:36 +02:00
userset: # Username/color update messages
2024-07-09 17:48:05 +02:00
interval: 1800000
2023-09-11 06:01:49 +02:00
num: 1000
2024-07-23 11:54:36 +02:00
chset: # Channel settings messages
interval: 1800000
num: 1024
2024-07-23 11:54:36 +02:00
n: # Note messages
# TODO is this correct?
interval: 1000
num: 512
2024-07-23 11:54:36 +02:00
# The other rate limits are like the above messages, but for other types of users.
# Rate limits for users with a crown.
2023-09-11 06:01:49 +02:00
crown:
normal:
a: 600
m: 50
2024-02-01 14:25:24 +01:00
ch: 1000
kickban: 125
unban: 125
t: 7.8125
+ls: 16.666666666666668
-ls: 16.666666666666668
chown: 2000
hi: 50
bye: 50
devices: 50
admin message: 50
2023-09-11 06:01:49 +02:00
chains:
userset:
2024-07-09 17:48:05 +02:00
interval: 1800000
2023-09-11 06:01:49 +02:00
num: 1000
chset:
interval: 1800000
num: 1024
n:
interval: 1000
num: 512
2024-07-23 11:54:36 +02:00
# Rate limits for admins.
2023-09-11 06:01:49 +02:00
admin:
normal:
a: 120
2024-07-09 17:48:05 +02:00
m: 16.666666666666668
2024-02-01 14:25:24 +01:00
ch: 100
kickban: 16.666666666666668
unban: 125
t: 3.90625
+ls: 16.666666666666668
-ls: 16.666666666666668
chown: 500
hi: 50
bye: 50
devices: 50
admin message: 16.666666666666668
2023-09-11 06:01:49 +02:00
chains:
userset:
interval: 500
2023-09-11 06:01:49 +02:00
num: 1000
chset:
interval: 1800000
num: 1024
n:
interval: 50
num: 512