Right way to send noteQuota to client

This commit is contained in:
wolfy01 2020-04-07 04:22:48 -04:00 committed by GitHub
parent d5d8a7ff1a
commit 237139d715
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -29,12 +29,12 @@ module.exports = (cl) => {
if (msg._id.length > 512) return; if (msg._id.length > 512) return;
cl.setChannel(msg._id, msg.set); cl.setChannel(msg._id, msg.set);
if (cl.channel.isLobby(cl.channel._id)) { if (cl.channel.isLobby(cl.channel._id)) {
cl.channel.sendNotequota(quotas.note.lobby.allowance, quotas.note.lobby.max, quotas.note.lobby.maxHistLen); cl.sendArray([{m: 'nq', allowance: quotas.note.lobby.allowance, max: quotas.note.lobby.max, maxHistLen: quotas.note.lobby.maxHistLen}])
} else { } else {
if (!(cl.user._id == cl.channel.crown.userId)) { if (!(cl.user._id == cl.channel.crown.userId)) {
cl.channel.sendNotequota(quotas.note.normal.allowance, quotas.note.normal.max, quotas.note.normal.maxHistLen); cl.sendArray([{m: 'nq', allowance: quotas.note.normal.allowance, max: quotas.note.normal.max, maxHistLen: quotas.note.normal.maxHistLen}])
} else { } else {
cl.channel.sendNotequota(quotas.note.insane.allowance, quotas.note.insane.max, quotas.note.insane.maxHistLen); cl.sendArray([{m: 'nq', allowance: quotas.note.insane.allowance, max: quotas.note.insane.max, maxHistLen: quotas.note.insane.maxHistLen}])
} }
} }
} }