cvium / irc_bot

Simple library for creating an IRC bot
MIT License
9 stars 7 forks source link

add channel key support #9

Closed ekilah closed 1 year ago

ekilah commented 1 year ago

Fixes #6

Adds support for joining channels that have a key / password / mode +k. You provide the key next to the channel name:

instead of '#channel-name' you do '#channel-name YourKeyHere'

cvium commented 1 year ago

Can a channel key contain spaces? Since you only want to split it into two, you should call split(string, 1) instead.

I'm also not sure I like the whitespace as delimiter. Comma is not allowed in a channel name either, so it could be used as well.

Thoughts?

ekilah commented 1 year ago

I'm very new to IRC, and I didn't go looking for rules about channel names or keys re: whitespace. Good call/question.

Comma as a delimiter seems slightly more complicated because you might want to allow for whitespace around it, requiring a regex etc.

I can make the split change to theoretically allow whitespace in keys, sure!

cvium commented 1 year ago

Thanks. I have pushed a new release.

ekilah commented 1 year ago

Thanks for the quick responses!