ThePooN / bancho.js

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

Add event emitter for mods change #9

Closed kiliansch closed 3 years ago

kiliansch commented 3 years ago

This enables handling mod changes at any time through checking !mp settings.

ThePooN commented 3 years ago

Hello and thanks for contributing.

There already is a mods event, which should fire everytime this.mods is altered - as is already the case. This sounds like what you're looking for.

Does that not work in your case? If not, can we work toward fixing that instead?

kiliansch commented 3 years ago

Hi, thanks for your reply! The mods event indeed works as intended, the mistake was on my side. Thanks for pointing that out, i reviewed my code and found a solution. I had an edge case in which this new event would've been a quick fix, but i managed to get it done without the event at all.

On a side note, thanks for creating this library, it is really useful and well written.