summaryrefslogtreecommitdiff
path: root/src/guildmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-29 19:32:58 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-29 19:32:58 +0300
commite55ed9a138e97f6fba5e3b6858a755f8a50197d2 (patch)
tree90b5337d62f42b2060328905776748f32c6e4eb6 /src/guildmanager.cpp
parent88f71d6a8673932d178408e7632a6eea08623294 (diff)
downloadmv-e55ed9a138e97f6fba5e3b6858a755f8a50197d2.tar.gz
mv-e55ed9a138e97f6fba5e3b6858a755f8a50197d2.tar.bz2
mv-e55ed9a138e97f6fba5e3b6858a755f8a50197d2.tar.xz
mv-e55ed9a138e97f6fba5e3b6858a755f8a50197d2.zip
Move from client packets limiter related code into separate file.
Diffstat (limited to 'src/guildmanager.cpp')
-rw-r--r--src/guildmanager.cpp7
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;