bancho.js 0.11.1 → 0.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  ## Version 0.11
4
4
 
5
+ ### Version 0.11.2
6
+
7
+ - BanchoLobby: Fix mods listener never unset in `updateSettings`
8
+ Caused some "memory leak" warning (`MaxListenersExceededWarning`) to be fired (without any impact, per nodejs doc).
9
+ Rest assured, you'd have to execute a LOT of `updateSettings` call in the same lobby to notice any increase in resources usage...
10
+
11
+ - BanchoLobby: Fix `!mp settings` never firing again on user lookup error
12
+ Never encountered this, also the id should be in cache from the `playerJoined` event anyway, but there is always a possibility...
13
+
5
14
  ### Version 0.11.1
6
15
 
7
16
  - Fix typings compilation on recent TypeScript versions
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![NPM](https://nodei.co/npm/bancho.js.png?compact=true)](https://nodei.co/npm/bancho.js/)
4
4
  [![pipeline status](https://git.cartooncraft.fr/ThePooN/bancho.js/badges/master/pipeline.svg)](https://git.cartooncraft.fr/ThePooN/bancho.js/commits/master)
5
5
 
6
- ## Current release: 0.11.1
6
+ ## Current release: 0.11.2
7
7
 
8
8
  # Introduction
9
9
 
@@ -834,12 +834,13 @@ class BanchoLobby extends EventEmitter {
834
834
  amountOfPlayers = playersRegex.playersAmount;
835
835
  if(amountOfPlayers == 0) {
836
836
  this.pushSlotsUpdateQueue(() => {
837
- this.slots = this._createSlotsArray();
837
+ this.slots = slots;
838
838
  this.slotsUpdateCallback();
839
839
  if(initializeMods)
840
840
  this.mods = [];
841
- callerResolve();
842
841
  this.updateSettingsPromise = null;
842
+ this.removeListener("mods", modsListener);
843
+ callerResolve();
843
844
  });
844
845
  this.channel.removeListener("message", listener);
845
846
  }
@@ -891,12 +892,15 @@ class BanchoLobby extends EventEmitter {
891
892
  this.slotsUpdateCallback();
892
893
  if(initializeMods)
893
894
  this.mods = [];
894
- callerResolve();
895
895
  this.updateSettingsPromise = null;
896
+ this.removeListener("mods", modsListener);
897
+ callerResolve();
896
898
  });
897
899
  this.channel.removeListener("message", listener);
898
900
  }
899
901
  }, (err) => {
902
+ this.updateSettingsPromise = null;
903
+ this.removeListener("mods", modsListener);
900
904
  callerReject(err);
901
905
  });
902
906
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bancho.js",
3
- "version": "0.11.1",
3
+ "version": "0.11.2",
4
4
  "description": "Interface with Bancho over IRC, made easy and reliable",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",