Skip to content

Commit

Permalink
Use details instead of state for server name
Browse files Browse the repository at this point in the history
  • Loading branch information
Lpsd committed Oct 12, 2023
1 parent 249e65b commit 488e7a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Client/core/CSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3463,7 +3463,9 @@ void CSettings::SaveData()
if (g_pCore->IsConnected())
{
SString serverName = g_pCore->GetLastConnectedServerName();
state = (serverName.length() > 0) ? SString("In-game (%s)", serverName) : "In-game";
state = "In-game";

discord->SetPresenceDetails(serverName.c_str(), false);
}

discord->SetPresenceState(state, false);
Expand Down
2 changes: 1 addition & 1 deletion Client/mods/deathmatch/logic/CPacketHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ void CPacketHandler::Packet_ServerJoined(NetBitStreamInterface& bitStream)
if (serverName.length() > 0)
{
g_pCore->SetLastConnectedServerName(serverName);
discord->SetPresenceState(SString("In-game (%s)", serverName), false);
discord->SetPresenceDetails(serverName.c_str(), false);
}
}
}
Expand Down

0 comments on commit 488e7a1

Please sign in to comment.