diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-03-26 01:58:10 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-03-26 01:58:10 +0300 |
commit | 170b469cbcf4adcd82604a6b2efd5a0630ef3fb5 (patch) | |
tree | d37c726898a3a283d5f750b536dbe32bb326463f /src | |
parent | 43be2ecae97034f764460a5932ca97e6354da89e (diff) | |
download | mv-170b469cbcf4adcd82604a6b2efd5a0630ef3fb5.tar.gz mv-170b469cbcf4adcd82604a6b2efd5a0630ef3fb5.tar.bz2 mv-170b469cbcf4adcd82604a6b2efd5a0630ef3fb5.tar.xz mv-170b469cbcf4adcd82604a6b2efd5a0630ef3fb5.zip |
add missing const to adminhandler.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/adminhandler.h | 22 | ||||
-rw-r--r-- | src/net/ea/adminhandler.cpp | 14 | ||||
-rw-r--r-- | src/net/ea/adminhandler.h | 14 | ||||
-rw-r--r-- | src/net/eathena/adminhandler.cpp | 8 | ||||
-rw-r--r-- | src/net/eathena/adminhandler.h | 8 | ||||
-rw-r--r-- | src/net/tmwa/adminhandler.cpp | 8 | ||||
-rw-r--r-- | src/net/tmwa/adminhandler.h | 8 |
7 files changed, 41 insertions, 41 deletions
diff --git a/src/net/adminhandler.h b/src/net/adminhandler.h index 6b6aac078..a7820a832 100644 --- a/src/net/adminhandler.h +++ b/src/net/adminhandler.h @@ -35,29 +35,29 @@ class AdminHandler virtual ~AdminHandler() { } - virtual void announce(const std::string &text) = 0; + virtual void announce(const std::string &text) const = 0; - virtual void localAnnounce(const std::string &text) = 0; + virtual void localAnnounce(const std::string &text) const = 0; - virtual void hide(const bool hide) = 0; + virtual void hide(const bool hide) const = 0; - virtual void kick(const int playerId) = 0; + virtual void kick(const int playerId) const = 0; - virtual void kickName(const std::string &name) = 0; + virtual void kickName(const std::string &name) const = 0; - virtual void ban(const int playerId) = 0; + virtual void ban(const int playerId) const = 0; - virtual void banName(const std::string &name) = 0; + virtual void banName(const std::string &name) const = 0; - virtual void unban(const int playerId) = 0; + virtual void unban(const int playerId) const = 0; - virtual void unbanName(const std::string &name) = 0; + virtual void unbanName(const std::string &name) const = 0; virtual void mute(const int playerId, const int type, - const int limit) = 0; + const int limit) const = 0; virtual void warp(const std::string &map, - const int x, const int y) = 0; + const int x, const int y) const = 0; }; } // namespace Net diff --git a/src/net/ea/adminhandler.cpp b/src/net/ea/adminhandler.cpp index 7a07cb4a2..79eff8e68 100644 --- a/src/net/ea/adminhandler.cpp +++ b/src/net/ea/adminhandler.cpp @@ -33,38 +33,38 @@ namespace Ea const std::string GENERAL_CHANNEL = ""; -void AdminHandler::kickName(const std::string &name) +void AdminHandler::kickName(const std::string &name) const { Net::getChatHandler()->talk("@kick " + name, GENERAL_CHANNEL); } -void AdminHandler::ban(const int playerId A_UNUSED) +void AdminHandler::ban(const int playerId A_UNUSED) const { // Not supported } -void AdminHandler::banName(const std::string &name) +void AdminHandler::banName(const std::string &name) const { Net::getChatHandler()->talk("@ban " + name, GENERAL_CHANNEL); } -void AdminHandler::unban(const int playerId A_UNUSED) +void AdminHandler::unban(const int playerId A_UNUSED) const { // Not supported } -void AdminHandler::unbanName(const std::string &name) +void AdminHandler::unbanName(const std::string &name) const { Net::getChatHandler()->talk("@unban " + name, GENERAL_CHANNEL); } void AdminHandler::mute(const int playerId A_UNUSED, const int type A_UNUSED, - const int limit A_UNUSED) + const int limit A_UNUSED) const { return; } -void AdminHandler::warp(const std::string &map, const int x, const int y) +void AdminHandler::warp(const std::string &map, const int x, const int y) const { Net::getChatHandler()->talk(strprintf( "@warp %s %d %d", map.c_str(), x, y), GENERAL_CHANNEL); diff --git a/src/net/ea/adminhandler.h b/src/net/ea/adminhandler.h index 68b7c303e..4100ce4fc 100644 --- a/src/net/ea/adminhandler.h +++ b/src/net/ea/adminhandler.h @@ -40,21 +40,21 @@ class AdminHandler : public Net::AdminHandler virtual ~AdminHandler() { } - virtual void kickName(const std::string &name); + virtual void kickName(const std::string &name) const; - virtual void ban(const int playerId); + virtual void ban(const int playerId) const; - virtual void banName(const std::string &name); + virtual void banName(const std::string &name) const; - virtual void unban(const int playerId); + virtual void unban(const int playerId) const; - virtual void unbanName(const std::string &name); + virtual void unbanName(const std::string &name) const; virtual void mute(const int playerId, const int type, - const int limit); + const int limit) const; virtual void warp(const std::string &map, - const int x, const int y); + const int x, const int y) const; }; } // namespace Ea diff --git a/src/net/eathena/adminhandler.cpp b/src/net/eathena/adminhandler.cpp index 0b2d91063..662dee9ed 100644 --- a/src/net/eathena/adminhandler.cpp +++ b/src/net/eathena/adminhandler.cpp @@ -67,27 +67,27 @@ void AdminHandler::handleMessage(Net::MessageIn &msg) } } -void AdminHandler::announce(const std::string &text) +void AdminHandler::announce(const std::string &text) const { MessageOut outMsg(CMSG_ADMIN_ANNOUNCE); outMsg.writeInt16(static_cast<int16_t>(text.length() + 4)); outMsg.writeString(text, static_cast<int>(text.length())); } -void AdminHandler::localAnnounce(const std::string &text) +void AdminHandler::localAnnounce(const std::string &text) const { MessageOut outMsg(CMSG_ADMIN_LOCAL_ANNOUNCE); outMsg.writeInt16(static_cast<int16_t>(text.length() + 4)); outMsg.writeString(text, static_cast<int>(text.length())); } -void AdminHandler::hide(const bool h A_UNUSED) +void AdminHandler::hide(const bool h A_UNUSED) const { MessageOut outMsg(CMSG_ADMIN_HIDE); outMsg.writeInt32(0); //unused } -void AdminHandler::kick(const int playerId) +void AdminHandler::kick(const int playerId) const { MessageOut outMsg(CMSG_ADMIN_KICK); outMsg.writeInt32(playerId); diff --git a/src/net/eathena/adminhandler.h b/src/net/eathena/adminhandler.h index e6ba376f3..cbbb9d374 100644 --- a/src/net/eathena/adminhandler.h +++ b/src/net/eathena/adminhandler.h @@ -42,13 +42,13 @@ class AdminHandler final : public MessageHandler, public Ea::AdminHandler void handleMessage(Net::MessageIn &msg); - void announce(const std::string &text); + void announce(const std::string &text) const; - void localAnnounce(const std::string &text); + void localAnnounce(const std::string &text) const; - void hide(const bool h); + void hide(const bool h) const; - void kick(const int playerId); + void kick(const int playerId) const; }; } // namespace EAthena diff --git a/src/net/tmwa/adminhandler.cpp b/src/net/tmwa/adminhandler.cpp index f5a8b7d05..4ff07bd76 100644 --- a/src/net/tmwa/adminhandler.cpp +++ b/src/net/tmwa/adminhandler.cpp @@ -68,27 +68,27 @@ void AdminHandler::handleMessage(Net::MessageIn &msg) BLOCK_END("AdminHandler::handleMessage") } -void AdminHandler::announce(const std::string &text) +void AdminHandler::announce(const std::string &text) const { MessageOut outMsg(CMSG_ADMIN_ANNOUNCE); outMsg.writeInt16(static_cast<int16_t>(text.length() + 4)); outMsg.writeString(text, static_cast<int>(text.length())); } -void AdminHandler::localAnnounce(const std::string &text) +void AdminHandler::localAnnounce(const std::string &text) const { MessageOut outMsg(CMSG_ADMIN_LOCAL_ANNOUNCE); outMsg.writeInt16(static_cast<int16_t>(text.length() + 4)); outMsg.writeString(text, static_cast<int>(text.length())); } -void AdminHandler::hide(const bool h A_UNUSED) +void AdminHandler::hide(const bool h A_UNUSED) const { MessageOut outMsg(CMSG_ADMIN_HIDE); outMsg.writeInt32(0); //unused } -void AdminHandler::kick(const int playerId) +void AdminHandler::kick(const int playerId) const { MessageOut outMsg(CMSG_ADMIN_KICK); outMsg.writeInt32(playerId); diff --git a/src/net/tmwa/adminhandler.h b/src/net/tmwa/adminhandler.h index f322cf4bf..15bb42e88 100644 --- a/src/net/tmwa/adminhandler.h +++ b/src/net/tmwa/adminhandler.h @@ -42,13 +42,13 @@ class AdminHandler final : public MessageHandler, public Ea::AdminHandler void handleMessage(Net::MessageIn &msg); - void announce(const std::string &text); + void announce(const std::string &text) const; - void localAnnounce(const std::string &text); + void localAnnounce(const std::string &text) const; - void hide(const bool h); + void hide(const bool h) const; - void kick(const int playerId); + void kick(const int playerId) const; }; } // namespace TmwAthena |