diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-29 19:32:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-29 19:32:58 +0300 |
commit | e55ed9a138e97f6fba5e3b6858a755f8a50197d2 (patch) | |
tree | 90b5337d62f42b2060328905776748f32c6e4eb6 /src/guildmanager.cpp | |
parent | 88f71d6a8673932d178408e7632a6eea08623294 (diff) | |
download | ManaVerse-e55ed9a138e97f6fba5e3b6858a755f8a50197d2.tar.gz ManaVerse-e55ed9a138e97f6fba5e3b6858a755f8a50197d2.tar.bz2 ManaVerse-e55ed9a138e97f6fba5e3b6858a755f8a50197d2.tar.xz ManaVerse-e55ed9a138e97f6fba5e3b6858a755f8a50197d2.zip |
Move from client packets limiter related code into separate file.
Diffstat (limited to 'src/guildmanager.cpp')
-rw-r--r-- | src/guildmanager.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/guildmanager.cpp b/src/guildmanager.cpp index df2c8686f..809343daa 100644 --- a/src/guildmanager.cpp +++ b/src/guildmanager.cpp @@ -36,6 +36,7 @@ #include "net/chathandler.h" #include "net/net.h" +#include "net/packetlimiter.h" #include "utils/delete2.h" #include "utils/timer.h" @@ -141,7 +142,7 @@ void GuildManager::requestGuildInfo() if (!mGotName && !mSentNameRequest) { - if (!client->limitPackets(PACKET_WHISPER)) + if (!PacketLimiter::limitPackets(PACKET_WHISPER)) return; send("!info " + toString(tick_time)); mRequest = true; @@ -150,7 +151,7 @@ void GuildManager::requestGuildInfo() } else if (!mGotInfo && !mSentInfoRequest && !mSentNameRequest) { - if (!client->limitPackets(PACKET_WHISPER)) + if (!PacketLimiter::limitPackets(PACKET_WHISPER)) return; send("!getonlineinfo " + toString(tick_time)); mRequest = true; @@ -163,7 +164,7 @@ void GuildManager::slowLogic() { if (!mGotOnlineInfo && mGotName && mRequestTime < cur_time) { - if (!client->limitPackets(PACKET_WHISPER)) + if (!PacketLimiter::limitPackets(PACKET_WHISPER)) return; send("!getonlineinfo " + toString(tick_time)); mRequest = true; |