KamilaBorowska / showdown2irc

Converter of Showdown protocol to IRC protocol
Other
9 stars 1 forks source link

Implement support for joining 0 room #2

Open KamilaBorowska opened 8 years ago

KamilaBorowska commented 8 years ago

This special room causes all rooms to be left. Yay :smile:.

KamilaBorowska commented 8 years ago

/join 0 on IRC causes an user to leave all users he is in. Quite pointless, but hey, it's in IRC standard :smile:. Might as well have that.

This is a Showdown to IRC converter. You may want to register Pokemon Showdown account on https://play.pokemonshowdown.com/. No e-mail is required, so you can start right away. To login with showdown2irc, specify your "Real name" as your username (real names can contain spaces unlike nicknames), and "Password" as a password.

The command to leave a room is called part on Showdown. You will need to call it on all rooms. You may also want to destroy room objects after receiving deinit command.

rooms in BotConnection is not exposed, so you may want to implement a code that will allow you to iterate over rooms for this to work (perhaps functional style ForEach function).

Good luck, feel free to ask in this issue if you need help implementing this.