mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2024-11-29 07:32:14 +00:00
Merge pull request #156 from ArturPhilibin/bugfix/lebra_leave_join_spam_crash
Fixes a bug where users spamming join and rejoin can sometimes cause …
This commit is contained in:
commit
a9917096c9
1 changed files with 5 additions and 0 deletions
|
@ -183,6 +183,11 @@ module.exports = function (namespace) {
|
|||
const removeGatherer = (gather, user) => {
|
||||
let gatherLeaver = gather.getGatherer(user);
|
||||
|
||||
if (!gatherLeaver) {
|
||||
winston.info(`${user.username} ${user.id} attempted to leave ${gather.type} gather, but was not in gather.`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (gather.can("removeGatherer")) {
|
||||
gather.removeGatherer(user);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue