summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-11-30 20:50:31 +0300
committerAndrei Karas <akaras@inbox.ru>2011-11-30 20:50:31 +0300
commitbf41736950d9e22be8b2b201dcd4833a50b26a99 (patch)
tree50ba5ff1db2740ec8de08093b899473ec8a25cd0 /src/gui
parent7c6621108b54fd66fbb7aa87be067a34abcc3ced (diff)
downloadmanaverse-bf41736950d9e22be8b2b201dcd4833a50b26a99.tar.gz
manaverse-bf41736950d9e22be8b2b201dcd4833a50b26a99.tar.bz2
manaverse-bf41736950d9e22be8b2b201dcd4833a50b26a99.tar.xz
manaverse-bf41736950d9e22be8b2b201dcd4833a50b26a99.zip
Add limits for online list packet.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/whoisonline.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gui/whoisonline.cpp b/src/gui/whoisonline.cpp
index fde0f08da..6004f706e 100644
--- a/src/gui/whoisonline.cpp
+++ b/src/gui/whoisonline.cpp
@@ -536,7 +536,8 @@ void WhoIsOnline::download()
}
else
{
- Net::getPlayerHandler()->requestOnlineList();
+ if (Client::limitPackets(PACKET_ONLINELIST))
+ Net::getPlayerHandler()->requestOnlineList();
}
}
@@ -618,9 +619,11 @@ void WhoIsOnline::action(const gcn::ActionEvent &event)
}
else
{
- mUpdateTimer = cur_time - 20;
- Net::getPlayerHandler()->requestOnlineList();
- setCaption(_("Who Is Online - Update"));
+ if (Client::limitPackets(PACKET_ONLINELIST))
+ {
+ mUpdateTimer = cur_time;
+ Net::getPlayerHandler()->requestOnlineList();
+ }
}
}
}