Lost focus
This commit is contained in:
@@ -28,13 +28,13 @@
|
|||||||
//heartbeat system
|
//heartbeat system
|
||||||
//-------------------------
|
//-------------------------
|
||||||
|
|
||||||
void ServerApplication::HandlePing(ServerPacket* const argPacket) {
|
void ServerApplication::hPing(ServerPacket* const argPacket) {
|
||||||
ServerPacket newPacket;
|
ServerPacket newPacket;
|
||||||
newPacket.type = SerialPacketType::PONG;
|
newPacket.type = SerialPacketType::PONG;
|
||||||
network.SendTo(argPacket->srcAddress, &newPacket);
|
network.SendTo(argPacket->srcAddress, &newPacket);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServerApplication::HandlePong(ServerPacket* const argPacket) {
|
void ServerApplication::hPong(ServerPacket* const argPacket) {
|
||||||
clientMgr.HandlePong(argPacket);
|
clientMgr.HandlePong(argPacket);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ void ServerApplication::HandlePong(ServerPacket* const argPacket) {
|
|||||||
//basic connections
|
//basic connections
|
||||||
//-------------------------
|
//-------------------------
|
||||||
|
|
||||||
void ServerApplication::HandleBroadcastRequest(ServerPacket* const argPacket) {
|
void ServerApplication::hBroadcastRequest(ServerPacket* const argPacket) {
|
||||||
//send the server's data
|
//send the server's data
|
||||||
ServerPacket newPacket;
|
ServerPacket newPacket;
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ void ServerApplication::HandleBroadcastRequest(ServerPacket* const argPacket) {
|
|||||||
network.SendTo(argPacket->srcAddress, static_cast<SerialPacket*>(&newPacket));
|
network.SendTo(argPacket->srcAddress, static_cast<SerialPacket*>(&newPacket));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServerApplication::HandleJoinRequest(ClientPacket* const argPacket) {
|
void ServerApplication::hJoinRequest(ClientPacket* const argPacket) {
|
||||||
//register the client
|
//register the client
|
||||||
int clientIndex = clientMgr.Create(argPacket->srcAddress);
|
int clientIndex = clientMgr.Create(argPacket->srcAddress);
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ void ServerApplication::HandleJoinRequest(ClientPacket* const argPacket) {
|
|||||||
std::cout << "New join, " << clientMgr.GetLoadedCount() << " clients and " << accountMgr.GetLoadedCount() << " accounts total" << std::endl;
|
std::cout << "New join, " << clientMgr.GetLoadedCount() << " clients and " << accountMgr.GetLoadedCount() << " accounts total" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServerApplication::HandleLoginRequest(ClientPacket* const argPacket) {
|
void ServerApplication::hLoginRequest(ClientPacket* const argPacket) {
|
||||||
//get the client data
|
//get the client data
|
||||||
ClientData* clientData = clientMgr.Get(argPacket->clientIndex);
|
ClientData* clientData = clientMgr.Get(argPacket->clientIndex);
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ void ServerApplication::HandleLoginRequest(ClientPacket* const argPacket) {
|
|||||||
std::cout << "New login, " << clientMgr.GetLoadedCount() << " clients and " << accountMgr.GetLoadedCount() << " accounts total" << std::endl;
|
std::cout << "New login, " << clientMgr.GetLoadedCount() << " clients and " << accountMgr.GetLoadedCount() << " accounts total" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServerApplication::HandleLogoutRequest(ClientPacket* const argPacket) {
|
void ServerApplication::hLogoutRequest(ClientPacket* const argPacket) {
|
||||||
//get the account and client data
|
//get the account and client data
|
||||||
AccountData* accountData = accountMgr.Get(argPacket->accountIndex);
|
AccountData* accountData = accountMgr.Get(argPacket->accountIndex);
|
||||||
if (!accountData) {
|
if (!accountData) {
|
||||||
@@ -144,7 +144,7 @@ void ServerApplication::HandleLogoutRequest(ClientPacket* const argPacket) {
|
|||||||
std::cout << "New logout, " << clientMgr.GetLoadedCount() << " clients and " << accountMgr.GetLoadedCount() << " accounts total" << std::endl;
|
std::cout << "New logout, " << clientMgr.GetLoadedCount() << " clients and " << accountMgr.GetLoadedCount() << " accounts total" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServerApplication::HandleDisconnectRequest(ClientPacket* const argPacket) {
|
void ServerApplication::hDisconnectRequest(ClientPacket* const argPacket) {
|
||||||
//get the client data
|
//get the client data
|
||||||
ClientData* clientData = clientMgr.Get(argPacket->clientIndex);
|
ClientData* clientData = clientMgr.Get(argPacket->clientIndex);
|
||||||
if (!clientData) {
|
if (!clientData) {
|
||||||
@@ -170,7 +170,3 @@ void ServerApplication::HandleDisconnectRequest(ClientPacket* const argPacket) {
|
|||||||
//finished this routine
|
//finished this routine
|
||||||
std::cout << "New disconnection, " << clientMgr.GetLoadedCount() << " clients and " << accountMgr.GetLoadedCount() << " accounts total" << std::endl;
|
std::cout << "New disconnection, " << clientMgr.GetLoadedCount() << " clients and " << accountMgr.GetLoadedCount() << " accounts total" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServerApplication::HandleDisconnectForced(ClientPacket* const argPacket) {
|
|
||||||
//HandleDisconnectForced
|
|
||||||
}
|
|
||||||
@@ -29,6 +29,10 @@
|
|||||||
//server commands
|
//server commands
|
||||||
//-------------------------
|
//-------------------------
|
||||||
|
|
||||||
|
void ServerApplication::hAdminDisconnectForced(ClientPacket* const argPacket) {
|
||||||
|
//TODO: (9) boot players
|
||||||
|
}
|
||||||
|
|
||||||
void ServerApplication::HandleShutdownRequest(ClientPacket* const argPacket) {
|
void ServerApplication::HandleShutdownRequest(ClientPacket* const argPacket) {
|
||||||
//get the account and client data
|
//get the account and client data
|
||||||
AccountData* accountData = accountMgr.Get(argPacket->accountIndex);
|
AccountData* accountData = accountMgr.Get(argPacket->accountIndex);
|
||||||
|
|||||||
Reference in New Issue
Block a user