Skip to content

Commit

Permalink
Fixed bug preventing /offline chat command
Browse files Browse the repository at this point in the history
  • Loading branch information
3vcloud committed May 15, 2024
1 parent 8f6e0fa commit aca717d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions GWToolboxdll/Windows/FriendListWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -578,20 +578,21 @@ namespace {
void CmdSetFriendListStatus(const wchar_t*, const int, const LPWSTR* argv)
{
std::wstring cmd = *argv;
bool res = false;
if (cmd == L"away") {
GW::FriendListMgr::SetFriendListStatus(GW::FriendStatus::Away);
res = GW::FriendListMgr::SetFriendListStatus(GW::FriendStatus::Away);
}
else if (cmd == L"online") {
GW::FriendListMgr::SetFriendListStatus(GW::FriendStatus::Online);
res = GW::FriendListMgr::SetFriendListStatus(GW::FriendStatus::Online);
}
else if (cmd == L"online") {
GW::FriendListMgr::SetFriendListStatus(GW::FriendStatus::Offline);
else if (cmd == L"offline") {
res = GW::FriendListMgr::SetFriendListStatus(GW::FriendStatus::Offline);
}
else if (cmd == L"busy" || cmd == L"dnd") {
GW::FriendListMgr::SetFriendListStatus(GW::FriendStatus::DND);
res = GW::FriendListMgr::SetFriendListStatus(GW::FriendStatus::DND);
}
else {
Log::ErrorW(L"Failed to recognise friend list status via command");
if (!res) {
Log::ErrorW(L"Failed to set friend list status");
}
}
}
Expand Down

0 comments on commit aca717d

Please sign in to comment.