room quota

This commit is contained in:
wolfy01 2020-04-07 02:42:49 -04:00 committed by GitHub
parent 7d02ef588d
commit d2f216a974
1 changed files with 1 additions and 0 deletions

View File

@ -23,6 +23,7 @@ module.exports = (cl) => {
}]) }])
}) })
cl.on("ch", msg => { cl.on("ch", msg => {
if (!cl.quotas.room.attempt()) return;
if (!msg.hasOwnProperty("set") || !msg.set) msg.set = {}; if (!msg.hasOwnProperty("set") || !msg.set) msg.set = {};
if (msg.hasOwnProperty("_id") && typeof msg._id == "string") { if (msg.hasOwnProperty("_id") && typeof msg._id == "string") {
if (msg._id.length > 512) return; if (msg._id.length > 512) return;