Skip to content

Idents containing "!" break, but work on Quassel desktop

Steps

  1. Connect to chat network that allows ! in ident
    • E.g. Bitlbee with bitlbee-discord
  2. Join a channel with a user that has this ident
    • E.g. on a Discord account connected to a mutually joined "server" (guild), set your display name to include ! marks
    • One such case, Gin !♡♅ƸӜƷ♅♡!
  3. Have at least one message from this user in Quassel's backlog
  4. Look at the nick list and chat on Quasseldroid
  5. Look at the nick list and chat on Quassel desktop

Expected

Both handle the nickname correctly, showing everything before the first exclamation point.

Actual

Quassel handles the nickname correctly, but Quasseldroid lumps in everything until the last ! mark.

Additional

Quasseldroid needs to split on the first ! and go until the @, as per Quassel's util.cpp.

QString userFromMask(const QString &mask)
{
    const int offset = mask.indexOf('!') + 1;
    if (offset <= 0)
        return {};
    const int length = mask.indexOf('@', offset) - offset;
    return mask.mid(offset, length >= 0 ? length : -1);
}

This is.. a broken situation, but it should be reasonable to at least handle it as well as Quassel desktop does.

Item Quassel Quasseldroid
Message nick Gin_ Gin_!Gin_!♡♅ƸӜƷ♅♡
IrcUser nick Gin_ Gin_
IrcUser ident Gin_!♡♅ƸӜƷ♅♡! Gin_!♡♅ƸӜƷ♅♡!

Correct copied message, Quassel desktop

[9:32:08 am] <Gin_> I hope it will go smoothly for you

Wrong copied message, Quasseldroid

[9:32 am] <Gin_!Gin_!♡♅ƸӜƷ♅♡> I hope it will go smoothly for you
Edited by Shane Synan