summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client.cpp8
-rw-r--r--src/client.h1
-rw-r--r--src/guildmanager.cpp4
3 files changed, 10 insertions, 3 deletions
diff --git a/src/client.cpp b/src/client.cpp
index cfff614ef..e264235d5 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -2233,6 +2233,12 @@ void Client::initPacketLimiter()
mPacketLimits[PACKET_ONLINELIST].cntLimit = 1;
mPacketLimits[PACKET_ONLINELIST].cnt = 0;
+ // 300ms + 50 fix
+ mPacketLimits[PACKET_WHISPER].timeLimit = 30 + 5;
+ mPacketLimits[PACKET_WHISPER].lastTime = 0;
+ mPacketLimits[PACKET_WHISPER].cntLimit = 1;
+ mPacketLimits[PACKET_WHISPER].cnt = 0;
+
if (!mServerConfigDir.empty())
{
std::string packetLimitsName =
@@ -2269,7 +2275,7 @@ void Client::initPacketLimiter()
mPacketLimits[f].timeLimit = atoi(line);
}
inPacketFile.close();
- if (ver < 4)
+ if (ver < 5)
writePacketLimits(packetLimitsName);
}
}
diff --git a/src/client.h b/src/client.h
index 32197da8f..87786856e 100644
--- a/src/client.h
+++ b/src/client.h
@@ -137,6 +137,7 @@ enum PacketTypes
PACKET_ATTACK = 9,
PACKET_STOPATTACK = 10,
PACKET_ONLINELIST = 11,
+ PACKET_WHISPER = 12,
PACKET_SIZE
};
diff --git a/src/guildmanager.cpp b/src/guildmanager.cpp
index 485320130..38cf0818d 100644
--- a/src/guildmanager.cpp
+++ b/src/guildmanager.cpp
@@ -131,7 +131,7 @@ void GuildManager::requestGuildInfo()
if (!mGotName && !mSentNameRequest)
{
- if (!Client::limitPackets(PACKET_CHAT))
+ if (!Client::limitPackets(PACKET_WHISPER))
return;
send("!info " + toString(tick_time));
mRequest = true;
@@ -139,7 +139,7 @@ void GuildManager::requestGuildInfo()
}
else if (!mGotInfo && !mSentInfoRequest && !mSentNameRequest)
{
- if (!Client::limitPackets(PACKET_CHAT))
+ if (!Client::limitPackets(PACKET_WHISPER))
return;
send("!getonlineinfo " + toString(tick_time));
mRequest = true;