summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-23 15:34:11 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-23 19:46:20 +0300
commita29fd5e8a4bca6b6a11c44bff33c79a5f7b44bd3 (patch)
treee585fc4cbbbf1bf82ad0e50758028599f3402429 /src/net/ea
parent0d18f85ec3a2b3ded337863ff1bb7ae51fd62658 (diff)
downloadplus-a29fd5e8a4bca6b6a11c44bff33c79a5f7b44bd3.tar.gz
plus-a29fd5e8a4bca6b6a11c44bff33c79a5f7b44bd3.tar.bz2
plus-a29fd5e8a4bca6b6a11c44bff33c79a5f7b44bd3.tar.xz
plus-a29fd5e8a4bca6b6a11c44bff33c79a5f7b44bd3.zip
In adminhandler add function processKickAck.
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/adminhandler.cpp13
-rw-r--r--src/net/ea/adminhandler.h8
2 files changed, 21 insertions, 0 deletions
diff --git a/src/net/ea/adminhandler.cpp b/src/net/ea/adminhandler.cpp
index 6eb413e7c..4dd8083f3 100644
--- a/src/net/ea/adminhandler.cpp
+++ b/src/net/ea/adminhandler.cpp
@@ -22,13 +22,18 @@
#include "net/ea/adminhandler.h"
+#include "notifymanager.h"
+
#include "gui/chatconsts.h"
#include "net/chathandler.h"
+#include "net/messagein.h"
#include "net/serverfeatures.h"
#include "utils/stringutils.h"
+#include "resources/notifytypes.h"
+
#include <string>
#include "debug.h"
@@ -86,4 +91,12 @@ void AdminHandler::createItems(const int id, const int color,
}
}
+void AdminHandler::processKickAck(Net::MessageIn &msg)
+{
+ if (msg.readInt32() == 0)
+ NotifyManager::notify(NotifyTypes::KICK_FAIL);
+ else
+ NotifyManager::notify(NotifyTypes::KICK_SUCCEED);
+}
+
} // namespace Ea
diff --git a/src/net/ea/adminhandler.h b/src/net/ea/adminhandler.h
index 0228f9bd0..c92b7291c 100644
--- a/src/net/ea/adminhandler.h
+++ b/src/net/ea/adminhandler.h
@@ -27,6 +27,11 @@
#include "localconsts.h"
+namespace Net
+{
+ class MessageIn;
+}
+
namespace Ea
{
@@ -57,6 +62,9 @@ class AdminHandler notfinal : public Net::AdminHandler
void createItems(const int id, const int color,
const int amount) const override final;
+
+ protected:
+ static void processKickAck(Net::MessageIn &msg);
};
} // namespace Ea