Handler created for WhoRequestMsg

This commit is contained in:
2024-03-27 13:23:00 -04:00
parent 4598709ba1
commit 5397833dea
3 changed files with 49 additions and 25 deletions
@@ -52,27 +52,6 @@ public class ClientMessagePump implements NetMsgHandler {
this.server = server;
}
/*
* Incoming client protocol message are processed here
*/
private static void WhoRequest(WhoRequestMsg msg, ClientConnection origin) {
// Handle /who request
PlayerCharacter pc = origin.getPlayerCharacter();
if (pc == null)
return;
if (pc.getTimeStamp("WHO") > System.currentTimeMillis()) {
ErrorPopupMsg.sendErrorMsg(pc, "Who too fast! Please wait 3 seconds.");
return;
}
WhoResponseMsg.HandleResponse(msg.getSet(), msg.getFilterType(), msg.getFilter(), origin);
pc.getTimestamps().put("WHO", System.currentTimeMillis() + 3000);
}
private static void toggleLfgRecruiting(ToggleLfgRecruitingMsg msg, ClientConnection origin) throws MsgSendException {
PlayerCharacter pc = SessionManager.getPlayerCharacter(origin);
if (pc == null)
@@ -844,9 +823,6 @@ public class ClientMessagePump implements NetMsgHandler {
break;
case OPENVAULT:
break;
case WHOREQUEST:
WhoRequest((WhoRequestMsg) msg, origin);
break;
case CLIENTADMINCOMMAND:
ChatManager.HandleClientAdminCmd((ClientAdminCommandMsg) msg, origin);
break;