Skip to content

Commit

Permalink
cmdinterface: Tweak log level for certain expected failures
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Jul 7, 2024
1 parent 6a5f043 commit 6245d67
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/stdinreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ int cmdInputThreadFunc(void *)
bool foundActivePlayer = kickActivePlayerWithIdentity(playerIdentityStrCopy, kickReasonStrCopy, false);
if (!foundActivePlayer)
{
wz_command_interface_output("WZCMD error: Failed to find currently-connected player with matching public key or hash?\n");
wz_command_interface_output("WZCMD info: kick identity %s: failed to find currently-connected player with matching public key or hash\n", playerIdentityStrCopy.c_str());
}
});
}
Expand Down Expand Up @@ -841,11 +841,12 @@ int cmdInputThreadFunc(void *)
continue;
}
std::string playerIdentityStrCopy(playeridentitystring);
wzAsyncExecOnMainThread([playerIdentityStrCopy, freeChatEnabled] {
std::string chatLevelStrCopy(chatlevel);
wzAsyncExecOnMainThread([playerIdentityStrCopy, chatLevelStrCopy, freeChatEnabled] {
bool foundActivePlayer = changeHostChatPermissionsForActivePlayerWithIdentity(playerIdentityStrCopy, freeChatEnabled);
if (!foundActivePlayer)
{
wz_command_interface_output("WZCMD error: Failed to find currently-connected player with matching public key or hash?\n");
wz_command_interface_output("WZCMD info: set chat %s %s: failed to find currently-connected player with matching public key or hash\n", chatLevelStrCopy.c_str(), playerIdentityStrCopy.c_str());
}
});
}
Expand Down Expand Up @@ -997,7 +998,7 @@ int cmdInputThreadFunc(void *)
}
if (!foundActivePlayer)
{
wz_command_interface_output("WZCMD error: Failed to find currently-connected player with matching public key or hash?\n");
wz_command_interface_output("WZCMD info: chat direct %s: failed to find currently-connected player with matching public key or hash\n", playerIdentityStrCopy.c_str());
}
});
}
Expand Down

0 comments on commit 6245d67

Please sign in to comment.