teach nick_lc to handle # and other non-letters correctly #37
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 innick_lc()
, thetab
table is initialized to zeroes for things that aren't defined innick_uc_chars
ornick_lc_chars
. Sonick_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