I dunno if this is an issue in the bridge or not, given that it doesn't happen on freenode, for instance; but on one particular server, starting direct chats with irc users who have []s in their nicks fails (as in, theirnick[pc]).
Received an error on irc.server.com: err_nosuchnick
["mynick[pc]","theirnick{pc}","No such nick/channel"]
(Yes, that is {}s in the echo'd error.)
It doesn't seem to be an issue serverside, though, as sending a raw cmd works fine.
!cmd irc.server.com PRIVMSG theirnick[PC] :message
I'm kinda baffled as to what would be a before-irc-server issue that is still server specific. Any ideas as to where to keep digging?
It's likely that this server has different case mapping rules. In the IRC RFC, [ ] are the upper-case equivalents of { }, so they are semantically identical (when PMing nick{PC} it should go to the same user as nick[PC]). You can thank the Finns for that.
Because of IRC's Scandinavian origin, the characters {}|^ are
considered to be the lower case equivalents of the characters []\~,
respectively. This is a critical issue when determining the
equivalence of two nicknames or channel names.
Needless to say, this is insane and people tried to fix this. The bridge does look for the ISUPPORT CASEMAPPING rules, but it's likely that this is either not set or is set incorrectly on this IRCd.
Ah, right! So it turns out the issue is that this function, https://github.com/matrix-org/matrix-appservice-irc/blob/master/lib/irc/formatting.js#L245 , defaults casemapping to rfc1459, regardless of the server's casemapping. And the only places it's called are https://github.com/matrix-org/matrix-appservice-irc/blob/master/lib/models/IrcRoom.js#L16 and https://github.com/matrix-org/matrix-appservice-irc/blob/master/lib/bridge/MatrixHandler.js#L1304, both of which never pass in a case mapping.
This is a problem on my server because it accurately reports CASEMAPPING=ascii, and not on freenode because freenode has CASEMAPPING=rfc1459.
This seems to affect IRCnet where I am unable to message my IRC bot @_ircnet_]o[:irc.snt.utwente.nl as I immediately receive Received an error on irc.snt.utwente.nl: err_nosuchnick
["Mikaela-","}o{","No such nick/channel"].
If someone wants to test, the bot should reply to ping by saying pong.
Most helpful comment
This seems to affect IRCnet where I am unable to message my IRC bot
@_ircnet_]o[:irc.snt.utwente.nlas I immediately receiveReceived an error on irc.snt.utwente.nl: err_nosuchnick ["Mikaela-","}o{","No such nick/channel"].If someone wants to test, the bot should reply to
pingby sayingpong.