kiwiirc / irc-framework

🛠️ A better IRC framework for node.js. For bots and full clients.
MIT License
181 stars 63 forks source link

Normalize channel names in list numerics #320

Closed progval closed 2 years ago

progval commented 2 years ago

Closes https://github.com/thelounge/thelounge/issues/4126

Some servers may not write channel names with consistent casing. For example, Bahamut writes RPL_NAMREPLY using the real case of the channel, while RPL_ENDOFNAMES uses the case of the client's command.

For example, when joining a channel named #ValTest:

C: join #VALtest
S: :val4!~f@lfbn-idf3-1-1313-105.w92-170.abo.wanadoo.fr JOIN :#VALtest
S: :bitcoin.uk.eu.dal.net 353 val4 = #ValTest :val4 val3 @val2 
S: :bitcoin.uk.eu.dal.net 366 val4 #VALtest :End of /NAMES list.