diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-08-29 01:24:49 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-08-29 01:24:49 +0300 |
commit | ca130a19b36a78c6a23aa56c6ea82eaa187b0a06 (patch) | |
tree | a22f311c5698f3f4ee370c0f1d3cb05230a1da95 /src/net | |
parent | eeffaaf3ab0593f815e772bfb523b9e7a94d45f5 (diff) | |
download | manaverse-ca130a19b36a78c6a23aa56c6ea82eaa187b0a06.tar.gz manaverse-ca130a19b36a78c6a23aa56c6ea82eaa187b0a06.tar.bz2 manaverse-ca130a19b36a78c6a23aa56c6ea82eaa187b0a06.tar.xz manaverse-ca130a19b36a78c6a23aa56c6ea82eaa187b0a06.zip |
Use time_t for time values.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/ea/chathandler.cpp | 2 | ||||
-rw-r--r-- | src/net/ea/chatrecv.cpp | 2 | ||||
-rw-r--r-- | src/net/ea/chatrecv.h | 2 | ||||
-rw-r--r-- | src/net/packetcounters.cpp | 4 | ||||
-rw-r--r-- | src/net/tmwa/chatrecv.cpp | 2 | ||||
-rw-r--r-- | src/net/tmwa/guildmanager.h | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp index 8ce8ec59d..44a8cb736 100644 --- a/src/net/ea/chathandler.cpp +++ b/src/net/ea/chathandler.cpp @@ -35,7 +35,7 @@ ChatHandler::ChatHandler() { if (!ChatRecv::mSentWhispers.empty()) ChatRecv::mSentWhispers.pop(); - ChatRecv::mMotdTime = -1; + ChatRecv::mMotdTime = 0; ChatRecv::mShowAllLang = serverConfig.getValue("showAllLang", 0); ChatRecv::mShowMotd = config.getBoolValue("showmotd"); ChatRecv::mSkipping = true; diff --git a/src/net/ea/chatrecv.cpp b/src/net/ea/chatrecv.cpp index 4e4695cf6..ee994b7e4 100644 --- a/src/net/ea/chatrecv.cpp +++ b/src/net/ea/chatrecv.cpp @@ -46,7 +46,7 @@ namespace Ea namespace ChatRecv { WhisperQueue mSentWhispers; - int mMotdTime = -1; + time_t mMotdTime = 0; bool mShowAllLang = false; bool mShowMotd = false; bool mSkipping = true; diff --git a/src/net/ea/chatrecv.h b/src/net/ea/chatrecv.h index 374d6c12a..2904fc58b 100644 --- a/src/net/ea/chatrecv.h +++ b/src/net/ea/chatrecv.h @@ -53,7 +53,7 @@ namespace Ea std::string getLastWhisperNick(); extern WhisperQueue mSentWhispers; - extern int mMotdTime; + extern time_t mMotdTime; extern bool mShowAllLang; extern bool mShowMotd; extern bool mSkipping; diff --git a/src/net/packetcounters.cpp b/src/net/packetcounters.cpp index 13eae4701..f29bb890c 100644 --- a/src/net/packetcounters.cpp +++ b/src/net/packetcounters.cpp @@ -24,7 +24,7 @@ #include "debug.h" -extern volatile int cur_time; +extern volatile time_t cur_time; extern volatile bool runCounters; int PacketCounters::mInCurrentSec = 0; @@ -108,7 +108,7 @@ void PacketCounters::updateCounter(int &restrict currentSec, int &restrict calc, int &restrict counter) { - const int idx = cur_time % 60; + const time_t idx = cur_time % 60; if (currentSec != idx) { currentSec = idx; diff --git a/src/net/tmwa/chatrecv.cpp b/src/net/tmwa/chatrecv.cpp index 54c13545a..1d74fef4c 100644 --- a/src/net/tmwa/chatrecv.cpp +++ b/src/net/tmwa/chatrecv.cpp @@ -93,7 +93,7 @@ void ChatRecv::processChatContinue(std::string chatMsg, channel.empty()) { // skip motd from "new" tmw server - if (Ea::ChatRecv::mMotdTime == -1) + if (Ea::ChatRecv::mMotdTime == 0) { Ea::ChatRecv::mMotdTime = cur_time + 1; } diff --git a/src/net/tmwa/guildmanager.h b/src/net/tmwa/guildmanager.h index 24ace9e77..b47c498d6 100644 --- a/src/net/tmwa/guildmanager.h +++ b/src/net/tmwa/guildmanager.h @@ -96,7 +96,7 @@ class GuildManager final StringVect mTempList; EmulateGuildTab *mTab; bool mRequest; - int mRequestTime; + time_t mRequestTime; bool mGotOnlineInfo; }; |