summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-25 13:09:04 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-25 13:09:04 +0300
commit90a652e5c672b9a11b165ee939889f406b852ee1 (patch)
tree4841dff5271783feb53cd2d5164aea4c2ebf69b7 /src/net/ea
parenta306ecf96736779b08d1de7ec994d3d741d5dc61 (diff)
downloadmanaplus-90a652e5c672b9a11b165ee939889f406b852ee1.tar.gz
manaplus-90a652e5c672b9a11b165ee939889f406b852ee1.tar.bz2
manaplus-90a652e5c672b9a11b165ee939889f406b852ee1.tar.xz
manaplus-90a652e5c672b9a11b165ee939889f406b852ee1.zip
improve adminhandler class.
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/adminhandler.cpp12
-rw-r--r--src/net/ea/adminhandler.h10
2 files changed, 12 insertions, 10 deletions
diff --git a/src/net/ea/adminhandler.cpp b/src/net/ea/adminhandler.cpp
index 56b6dfe90..7a07cb4a2 100644
--- a/src/net/ea/adminhandler.cpp
+++ b/src/net/ea/adminhandler.cpp
@@ -38,7 +38,7 @@ void AdminHandler::kickName(const std::string &name)
Net::getChatHandler()->talk("@kick " + name, GENERAL_CHANNEL);
}
-void AdminHandler::ban(int playerId A_UNUSED)
+void AdminHandler::ban(const int playerId A_UNUSED)
{
// Not supported
}
@@ -48,7 +48,7 @@ void AdminHandler::banName(const std::string &name)
Net::getChatHandler()->talk("@ban " + name, GENERAL_CHANNEL);
}
-void AdminHandler::unban(int playerId A_UNUSED)
+void AdminHandler::unban(const int playerId A_UNUSED)
{
// Not supported
}
@@ -58,13 +58,13 @@ void AdminHandler::unbanName(const std::string &name)
Net::getChatHandler()->talk("@unban " + name, GENERAL_CHANNEL);
}
-void AdminHandler::mute(int playerId A_UNUSED, int type A_UNUSED,
- int limit A_UNUSED)
+void AdminHandler::mute(const int playerId A_UNUSED, const int type A_UNUSED,
+ const int limit A_UNUSED)
{
- return; // Still looking into this
+ return;
}
-void AdminHandler::warp(std::string map, int x, int y)
+void AdminHandler::warp(const std::string &map, const int x, const int y)
{
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 45b0af0f1..68b7c303e 100644
--- a/src/net/ea/adminhandler.h
+++ b/src/net/ea/adminhandler.h
@@ -42,17 +42,19 @@ class AdminHandler : public Net::AdminHandler
virtual void kickName(const std::string &name);
- virtual void ban(int playerId);
+ virtual void ban(const int playerId);
virtual void banName(const std::string &name);
- virtual void unban(int playerId);
+ virtual void unban(const int playerId);
virtual void unbanName(const std::string &name);
- virtual void mute(int playerId, int type, int limit);
+ virtual void mute(const int playerId, const int type,
+ const int limit);
- virtual void warp(std::string map, int x, int y);
+ virtual void warp(const std::string &map,
+ const int x, const int y);
};
} // namespace Ea