Skip to content

In json format, player name not displayed when player is not connected #72

@AmazingBeu

Description

@AmazingBeu

For TFH 24h, the chat are synchronized between multiple servers, so the player can receive chat messages from players that are connected on another servers.

For messages received in json format, the player name will not be displayed because better chat can't find the player, even if the nickname is given in the json. It's due of these code part:

@m_authorPlayer = FindPlayerByLogin(m_authorLogin);
if (m_authorPlayer !is null) {
@m_authorPlayerInfo = m_authorPlayer.User;
} else {
@m_authorPlayerInfo = FindPlayerInfoByLogin(m_authorLogin);
}
if (m_authorPlayerInfo !is null) {
m_authorName = m_authorPlayerInfo.Name;
}

if (info.m_authorName != "") {
// Add author name
AddColorableElement(ElementPlayerName(
info.m_authorName,
info.m_authorNickname,
info.m_authorLogin,
info.m_authorId,
info.m_authorClubTag
), info);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions