diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-11 17:43:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-11 17:43:59 +0300 |
commit | 407ef7d44af6cce1b25f6268c2c8b87ed419baf4 (patch) | |
tree | 116a94c6ddeb00fee94cee1e8ab37afc410da139 /src | |
parent | ae0cd07c5d94e3696a072bdd9f9aa58223cae75c (diff) | |
download | manaverse-407ef7d44af6cce1b25f6268c2c8b87ed419baf4.tar.gz manaverse-407ef7d44af6cce1b25f6268c2c8b87ed419baf4.tar.bz2 manaverse-407ef7d44af6cce1b25f6268c2c8b87ed419baf4.tar.xz manaverse-407ef7d44af6cce1b25f6268c2c8b87ed419baf4.zip |
eathena: add packet CMSG_ADMIN_MUTE 0x0149.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/adminhandler.h | 4 | ||||
-rw-r--r-- | src/net/eathena/adminhandler.cpp | 13 | ||||
-rw-r--r-- | src/net/eathena/adminhandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/protocol.h | 1 | ||||
-rw-r--r-- | src/net/tmwa/adminhandler.cpp | 3 | ||||
-rw-r--r-- | src/net/tmwa/adminhandler.h | 2 |
6 files changed, 18 insertions, 7 deletions
diff --git a/src/net/adminhandler.h b/src/net/adminhandler.h index 18e7c0fad..66a091f2c 100644 --- a/src/net/adminhandler.h +++ b/src/net/adminhandler.h @@ -23,6 +23,7 @@ #ifndef NET_ADMINHANDLER_H #define NET_ADMINHANDLER_H +#include "being/being.h" #include <iosfwd> #include <string> @@ -57,7 +58,8 @@ class AdminHandler notfinal virtual void unbanName(const std::string &name) const = 0; - virtual void mute(const int playerId, const int type, + virtual void mute(const Being *const being, + const int type, const int limit) const = 0; virtual void warp(const std::string &map, diff --git a/src/net/eathena/adminhandler.cpp b/src/net/eathena/adminhandler.cpp index 2ec6919c2..c4b55def4 100644 --- a/src/net/eathena/adminhandler.cpp +++ b/src/net/eathena/adminhandler.cpp @@ -134,10 +134,17 @@ void AdminHandler::recallName(const std::string &name) const outMsg.writeString(name, 24, "name"); } -void AdminHandler::mute(const int playerId A_UNUSED, const int type A_UNUSED, - const int limit A_UNUSED) const +void AdminHandler::mute(const Being *const being, + const int type, + const int limit) const { - return; + if (!being) + return; + + MessageOut outMsg(CMSG_ADMIN_MUTE); + outMsg.writeInt32(being->getId(), "account id"); + outMsg.writeInt8(type, "type"); + outMsg.writeInt16(limit, "value"); } } // namespace EAthena diff --git a/src/net/eathena/adminhandler.h b/src/net/eathena/adminhandler.h index 80357657f..54c06e02f 100644 --- a/src/net/eathena/adminhandler.h +++ b/src/net/eathena/adminhandler.h @@ -60,7 +60,7 @@ class AdminHandler final : public MessageHandler, public Ea::AdminHandler void recallName(const std::string &name) const override final; - void mute(const int playerId, + void mute(const Being *const being, const int type, const int limit) const override final; diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 4ee56c31d..b572f4958 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -305,6 +305,7 @@ #define CMSG_ADMIN_RESET_PLAYER 0x0197 #define CMSG_ADMIN_GOTO 0x01bb #define CMSG_ADMIN_RECALL 0x01bd +#define CMSG_ADMIN_MUTE 0x0149 #define CMSG_GUILD_CHECK_MASTER 0x014d #define CMSG_GUILD_REQUEST_INFO 0x014f diff --git a/src/net/tmwa/adminhandler.cpp b/src/net/tmwa/adminhandler.cpp index 9bb8d80bb..467f75467 100644 --- a/src/net/tmwa/adminhandler.cpp +++ b/src/net/tmwa/adminhandler.cpp @@ -127,7 +127,8 @@ void AdminHandler::recallName(const std::string &name) const Net::getChatHandler()->talk("@recall " + name, GENERAL_CHANNEL); } -void AdminHandler::mute(const int playerId A_UNUSED, const int type A_UNUSED, +void AdminHandler::mute(const Being *const being A_UNUSED, + const int type A_UNUSED, const int limit A_UNUSED) const { return; diff --git a/src/net/tmwa/adminhandler.h b/src/net/tmwa/adminhandler.h index 46b629d6e..417441fb4 100644 --- a/src/net/tmwa/adminhandler.h +++ b/src/net/tmwa/adminhandler.h @@ -60,7 +60,7 @@ class AdminHandler final : public MessageHandler, public Ea::AdminHandler void recallName(const std::string &name) const override final; - void mute(const int playerId, + void mute(const Being *const being, const int type, const int limit) const override final; }; |