summaryrefslogtreecommitdiff
path: root/src/logger.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-15 18:24:39 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-15 18:24:39 +0300
commit77afc97b4d6e4caace275d8bc21a94525ad070e2 (patch)
tree2c31833c1ecb84effd209aa3c568f2d2b3a175c2 /src/logger.h
parente45a51342495eccdb8280f1f1a7963c7b78f4772 (diff)
downloadmanaverse-77afc97b4d6e4caace275d8bc21a94525ad070e2.tar.gz
manaverse-77afc97b4d6e4caace275d8bc21a94525ad070e2.tar.bz2
manaverse-77afc97b4d6e4caace275d8bc21a94525ad070e2.tar.xz
manaverse-77afc97b4d6e4caace275d8bc21a94525ad070e2.zip
Show info about wrong packet size in chat if enabled show unimplimentaed packets.
Diffstat (limited to 'src/logger.h')
-rw-r--r--src/logger.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/logger.h b/src/logger.h
index 98cf2186a..19cf69ddb 100644
--- a/src/logger.h
+++ b/src/logger.h
@@ -56,6 +56,9 @@
#define UNIMPLIMENTEDPACKETFIELD(field) \
logger->unimplimented(msg.getId(), field)
+#define WRONGPACKETSIZE \
+ logger->unimplimented(CAST_U32(mId), mLength, mPos)
+
/**
* The Log Class : Useful to write debug or info messages
*/
@@ -180,6 +183,10 @@ class Logger final
void unimplimented(const int id,
const int id2);
+ void unimplimented(const uint32_t id,
+ const uint32_t id2,
+ const uint32_t id3);
+
private:
std::ofstream mLogFile;
std::vector<std::string> mDelayedLog;