diff options
Diffstat (limited to 'src/net/eathena/guildrecv.cpp')
-rw-r--r-- | src/net/eathena/guildrecv.cpp | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/net/eathena/guildrecv.cpp b/src/net/eathena/guildrecv.cpp index 74b8d9b8d..dd5eb890d 100644 --- a/src/net/eathena/guildrecv.cpp +++ b/src/net/eathena/guildrecv.cpp @@ -1,10 +1,10 @@ /* - * The ManaPlus Client + * The ManaVerse Client * Copyright (C) 2009-2010 The Mana Developers * Copyright (C) 2011-2020 The ManaPlus Developers - * Copyright (C) 2020-2023 The ManaVerse Developers + * Copyright (C) 2020-2025 The ManaVerse Developers * - * This file is part of The ManaPlus Client. + * This file is part of The ManaVerse Client. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -423,15 +423,9 @@ void GuildRecv::processGuildInvite(Net::MessageIn &msg) { const int guildId = msg.readInt32("guild id"); + const std::string guildName = msg.readString(24, "guild name"); if (socialWindow != nullptr) - { - const std::string guildName = msg.readString(24, "guild name"); socialWindow->showGuildInvite(guildName, guildId, ""); - } - else - { - msg.readString(24, "guild name"); - } } void GuildRecv::processGuildInviteAck(Net::MessageIn &msg) @@ -564,9 +558,11 @@ void GuildRecv::processGuildMessage(Net::MessageIn &msg) if (msgLength <= 0) return; + + std::string chatMsg = msg.readString(msgLength, "message"); + if (guildTab != nullptr) { - std::string chatMsg = msg.readString(msgLength, "message"); const size_t pos = chatMsg.find(" : ", 0); if (pos != std::string::npos) { @@ -586,7 +582,6 @@ void GuildRecv::processGuildMessage(Net::MessageIn &msg) else { DEBUGLOGSTR("invisible guild?"); - msg.readString(msgLength, "message"); } } @@ -698,8 +693,6 @@ void GuildRecv::processGuildPositionInfo(Net::MessageIn &msg) if ((guildTab == nullptr) && (chatWindow != nullptr)) { guildTab = new GuildTab(chatWindow); - if (config.getBoolValue("showChatHistory")) - guildTab->loadFromLogFile("#Guild"); if (localPlayer != nullptr) localPlayer->addGuild(taGuild); guildHandler->memberList(); |