Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

teach nick_lc to handle # and other non-letters correctly #37

Closed
wants to merge 1 commit into from

Conversation

eklitzke
Copy link
Contributor

So I've been running the feat/hip-cat branch and ran into a problem with channels that have a # in the name.

Let's say there are hipchat channels named #foo and #bar. Currently what will happen is when bitlbee starts up, it gets the channel list, and as it's adding the channels it tries to create IRC names for these channels. What will happen is currently in nick_lc(), the tab table is initialized to zeroes for things that aren't defined in nick_uc_chars or nick_lc_chars. So nick_lc will map "#foo" to "", because the # character gets replaced with \0. So ultimately, what happens is bitlbee will create IRC channels for #foo and #bar as #_ and #__, which isn't very useful.

With this change, nick_lc will map "#foo" to "#foo", and consequently the hipchat channels will be mapped to ##foo and ##bar. I can join the channels and whatnot, and everything seems to work OK with this change.

The original impetus for this change is for the feat/hip-cat branch, but I think that this is generally a bug in bitlbee and isn't really hipchat specific.

cc @dequis who seems to be driving the hipchat stuff

@erikformella
Copy link

💯

@dequis
Copy link
Member

dequis commented May 25, 2015

Oh uh apparently i forgot to submit my reply here. Well. Whatever.

It seemed weird to change something in nick_lc to fix something in channels, but after thinking about this, I think this is perfectly okay.

# should be caught by nick_strip in the case of nicks, but irc_channel_name_strip is much less strict. In fact nick_strip does exactly that kind of stripping the right way.

(also pull requests are supposed to be submitted to the develop branch but at this point it's just, uh, whatever, i'll just merge everywhere)

@dequis
Copy link
Member

dequis commented May 28, 2015

Merged to develop as fe63ed3. Thanks!

@dequis dequis closed this May 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants