sm00th / bitlbee-discord

Bitlbee plugin for Discord (http://discordapp.com)
GNU General Public License v2.0
290 stars 27 forks source link

[listchan] duplicate channel names joining first #51

Closed ar1a closed 7 years ago

ar1a commented 8 years ago

i have say 3 channels called #general over 3 servers, they are id 1 2 and 3 ,3 is the correct one (identified from topic) i chat add !3 yadayada, i dont join 3, i join 1

sm00th commented 8 years ago

Workaround: setting server_prefix_len to non-zero

digitalcircuit commented 7 years ago

Now that listchan is in master, should server_prefix_len be set to non-zero by default? Though the underlying bug here should also be fixed, this would help distinguishing identical channel names across servers when the topic's changed from default.

sm00th commented 7 years ago

Looked at it today and that might be the only viable solution at this point. The other solution would be to add indexes to bitlbee's bee_chat_info, but it is probably not a good idea. Bitblee rightfully doesn't expect a single account to have multiple channels with the same name, so it is plugin's job to ensure they are unique.

I'll set server_prefix_len to 3 by default and update the README explaining this.

sm00th commented 7 years ago

I'll also be adding '_' to the end of channel names till we get a unique name, so that even if a user has 2 servers with the same first 3 letters in the name the channel name will still be unique.