diff options
author | Fedja Beader <fedja@protonmail.ch> | 2025-03-26 21:39:29 +0100 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2025-03-26 21:56:58 +0100 |
commit | 22c8af423bd4375ea06cc1b314705f771be397f5 (patch) | |
tree | 6b575faa8c744100ad566ebc5dd0595f8ff21493 | |
parent | a87c1861f1ee87b67bb64c068bc71488498a7c34 (diff) | |
download | manaplus-ea_packet_0xcb_wrong_read_size.tar.gz manaplus-ea_packet_0xcb_wrong_read_size.tar.bz2 manaplus-ea_packet_0xcb_wrong_read_size.tar.xz manaplus-ea_packet_0xcb_wrong_read_size.zip |
Separate processKickAck handler for eathenaea_packet_0xcb_wrong_read_size
-rw-r--r-- | src/net/eathena/adminrecv.cpp | 12 | ||||
-rw-r--r-- | src/net/eathena/adminrecv.h | 1 | ||||
-rw-r--r-- | src/net/eathena/packetsin.inc | 2 |
3 files changed, 14 insertions, 1 deletions
diff --git a/src/net/eathena/adminrecv.cpp b/src/net/eathena/adminrecv.cpp index 19895924d..fc9cb606b 100644 --- a/src/net/eathena/adminrecv.cpp +++ b/src/net/eathena/adminrecv.cpp @@ -19,8 +19,12 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ + #include "net/eathena/adminrecv.h" +#include "enums/resources/notifytypes.h" +#include "notifymanager.h" + #include "logger.h" #include "net/messagein.h" @@ -79,4 +83,12 @@ void AdminRecv::processAccountStats(Net::MessageIn &msg) msg.readInt16("zero"); } +void AdminRecv::processKickAck(Net::MessageIn &msg) +{ + if (msg.readInt8("flag") == 0) + NotifyManager::notify(NotifyTypes::KICK_FAIL); + else + NotifyManager::notify(NotifyTypes::KICK_SUCCEED); +} + } // namespace EAthena diff --git a/src/net/eathena/adminrecv.h b/src/net/eathena/adminrecv.h index 1dc2b13b5..6a660b18a 100644 --- a/src/net/eathena/adminrecv.h +++ b/src/net/eathena/adminrecv.h @@ -32,6 +32,7 @@ namespace EAthena namespace AdminRecv { void processAdminGetLoginAck(Net::MessageIn &msg); + void processKickAck(Net::MessageIn &msg); void processSetTileType(Net::MessageIn &msg); void processAccountStats(Net::MessageIn &msg); } // namespace AdminRecv diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc index 2a8e26264..b93e9d09d 100644 --- a/src/net/eathena/packetsin.inc +++ b/src/net/eathena/packetsin.inc @@ -94,7 +94,7 @@ packet(SMSG_MAP_NOT_FOUND, 0x0840, -1, &GeneralRecv::processMap // map server, unknown versions packet(SMSG_ADMIN_GET_LOGIN_ACK, 0x01e0, 30, &AdminRecv::processAdminGetLoginAck, 0); -packet(SMSG_ADMIN_KICK_ACK, 0x00cd, 3, &Ea::AdminRecv::processKickAck, 0); +packet(SMSG_ADMIN_KICK_ACK, 0x00cd, 3, &AdminRecv::processKickAck, 0); packet(SMSG_ADMIN_SET_TILE_TYPE, 0x0192, 24, &AdminRecv::processSetTileType, 0); packet(SMSG_BATTLE_BEGINS, 0x08df, 50, &BattleGroundRecv::processBattleBegins, 0); packet(SMSG_BATTLE_JOINED, 0x08d9, 30, &BattleGroundRecv::processBattleJoined, 0); |