ThePooN / bancho.js

Interface with Bancho over IRC, made easy and reliable.
https://bancho.js.org
GNU General Public License v3.0
57 stars 6 forks source link

Check if member exists before emitting it #13

Closed KhooHaoYit closed 3 years ago

KhooHaoYit commented 3 years ago

Reproducing the error

const channel = await client.createLobby(`LobbyName`);
await channel.leave();

The reason this error exists

IRC sends duplicate PART events causes the library to crash

:Khoo_Hao_Yit!cho@ppy.sh PART :#mp_91173059
:Khoo_Hao_Yit!cho@ppy.sh PART :#mp_91173059

Pull request goal

This pull request aims to fix this issue by checking if the member exists before emitting it

ThePooN commented 3 years ago

thank you very much!

this will be shipped in the final 0.10 release, scheduled to be next week as it's currently under some testing in the wild on my end.