Skip to content

Commit

Permalink
Add identity verified status to WZCHATCMD output
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Mar 25, 2023
1 parent f12a614 commit 01bbbf5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/multilobbycommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,13 @@ bool processChatLobbySlashCommands(const NetworkTextMessage& message, HostLobbyO
const auto& identity = getMultiStats(message.sender).identity;
std::string senderhash = identity.publicHashString(64);
std::string senderPublicKeyB64 = base64Encode(identity.toBytes(EcKey::Public));
std::string senderVerifiedStatus = (ingame.VerifiedIdentity[message.sender]) ? "V" : "?";
std::string sendername = NetPlay.players[message.sender].name;
std::string sendername64 = base64Encode(std::vector<unsigned char>(sendername.begin(), sendername.end()));
std::string messagetext = message.text;
std::string messagetext64 = base64Encode(std::vector<unsigned char>(messagetext.begin(), messagetext.end()));
debug(LOG_INFO, "message [%s] [%s]", senderhash.c_str(), message.text);
wz_command_interface_output("WZCHATCMD: %i %s %s %s %s %s\n", message.sender, NetPlay.players[message.sender].IPtextAddress, senderhash.c_str(), senderPublicKeyB64.c_str(), sendername64.c_str(), messagetext64.c_str());
wz_command_interface_output("WZCHATCMD: %i %s %s %s %s %s %s\n", message.sender, NetPlay.players[message.sender].IPtextAddress, senderhash.c_str(), senderPublicKeyB64.c_str(), senderVerifiedStatus.c_str(), sendername64.c_str(), messagetext64.c_str());
if (strcmp(&message.text[LOBBY_COMMAND_PREFIX_LENGTH], "help") == 0)
{
lobbyCommand_PrintHelp(static_cast<uint32_t>(message.sender));
Expand Down

0 comments on commit 01bbbf5

Please sign in to comment.