Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Commit

Permalink
fix: fix the problem that addMessage is output as error in the console
Browse files Browse the repository at this point in the history
  • Loading branch information
ShrBox committed Jun 11, 2023
1 parent 19dafcf commit 8b9a362
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LiteLoader/src/liteloader/ModifyInfomation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ TClasslessInstanceHook(void*, "?send@CommandOutputSender@@UEAAXAEBVCommandOrigin


auto rv = original(this, origin, output);
if (origin.getOriginType() == (CommandOriginType)7) {
if (origin.getOriginType() == (CommandOriginType)OriginType::Server) {
std::string str = cmdstr.c_str();

if (ll::isDebugMode() && ll::globalRuntimeConfig.tickThreadId != std::this_thread::get_id()) {
Expand Down Expand Up @@ -206,7 +206,7 @@ TClasslessInstanceHook(void*, "?send@CommandOutputSender@@UEAAXAEBVCommandOrigin
}
}

auto& log = output.getSuccessCount() > 0 ? serverLogger.info : serverLogger.error;
auto& log = output.hasErrorMessage() ? serverLogger.error : serverLogger.info;
std::vector<std::string> ts = SplitStrWithPattern(str, "\n");
if (!ts.empty()) {
ts.pop_back();
Expand Down

0 comments on commit 8b9a362

Please sign in to comment.