summaryrefslogtreecommitdiff
path: root/src/net/tmwa/adminrecv.cpp
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2025-04-03 22:44:17 +0000
committerFedja Beader <fedja@protonmail.ch>2025-04-03 22:44:17 +0000
commit65f505ea28f29738e4d874f55d96d6e2579ba757 (patch)
treed216640a8cef9ae27afe593b037724834eacc4a1 /src/net/tmwa/adminrecv.cpp
parentbb01aea375047f23b5ddc4f481b611dff39003b2 (diff)
downloadmanaplus-65f505ea28f29738e4d874f55d96d6e2579ba757.tar.gz
manaplus-65f505ea28f29738e4d874f55d96d6e2579ba757.tar.bz2
manaplus-65f505ea28f29738e4d874f55d96d6e2579ba757.tar.xz
manaplus-65f505ea28f29738e4d874f55d96d6e2579ba757.zip
Fix wrong read of clif_GM_kickack packet
2024-08/01/#Debug.log:[14:25:43] Wrong actual or planned inbound packet size!. Packet id: 205(0xcd), Planned size: 3, Actual size: 6 2 bytes packet id + 1 byte flag = 3 2 bytes packet id + 4 byte flag (wrong) = 6 Squashed with: * Separate processKickAck handler for eathena * Move ea's adminrecv and its sole handler processKickAck into TMWA namespace * Revert "Fix wrong read of clif_GM_kickack packet" This would break TMWA packet processing, as @thorbjorn pointed out. This reverts commit efe43bac4de90b3e427d985b77cb3dd3206bcf9d. **** mana/plus!148
Diffstat (limited to 'src/net/tmwa/adminrecv.cpp')
-rw-r--r--src/net/tmwa/adminrecv.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/net/tmwa/adminrecv.cpp b/src/net/tmwa/adminrecv.cpp
new file mode 100644
index 000000000..58ee1b175
--- /dev/null
+++ b/src/net/tmwa/adminrecv.cpp
@@ -0,0 +1,45 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2004-2009 The Mana World Development Team
+ * Copyright (C) 2009-2010 The Mana Developers
+ * Copyright (C) 2011-2020 The ManaPlus Developers
+ * Copyright (C) 2020-2023 The ManaVerse Developers
+ *
+ * This file is part of The ManaPlus 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "net/tmwa/adminrecv.h"
+
+#include "notifymanager.h"
+
+#include "enums/resources/notifytypes.h"
+
+#include "net/messagein.h"
+
+#include "debug.h"
+
+namespace TmwAthena
+{
+
+void AdminRecv::processKickAck(Net::MessageIn &msg)
+{
+ if (msg.readInt32("account id") == 0)
+ NotifyManager::notify(NotifyTypes::KICK_FAIL);
+ else
+ NotifyManager::notify(NotifyTypes::KICK_SUCCEED);
+}
+
+} // namespace TmwAthena