mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 18:51:29 +00:00
Spelling errors and revised my cle change to put it much lower so it shouldn't have any side effects other than avoiding the crash
This commit is contained in:
parent
faaa98d3f0
commit
f388a605dd
@ -109,7 +109,7 @@ public:
|
|||||||
|
|
||||||
bool AddBannedIP(char* bannedIP, const char* notes); //Lieka Edit: Add IP address to the Banned_IPs table.
|
bool AddBannedIP(char* bannedIP, const char* notes); //Lieka Edit: Add IP address to the Banned_IPs table.
|
||||||
bool AddGMIP(char* ip_address, char* name);
|
bool AddGMIP(char* ip_address, char* name);
|
||||||
bool CheckBannedIPs(const char* loginIP); //Lieka Edit: Check incomming connection against banned IP table.
|
bool CheckBannedIPs(const char* loginIP); //Lieka Edit: Check incoming connection against banned IP table.
|
||||||
bool CheckGMIPs(const char* loginIP, uint32 account_id);
|
bool CheckGMIPs(const char* loginIP, uint32 account_id);
|
||||||
bool CheckNameFilter(const char* name, bool surname = false);
|
bool CheckNameFilter(const char* name, bool surname = false);
|
||||||
bool CheckUsedName(const char* name);
|
bool CheckUsedName(const char* name);
|
||||||
|
|||||||
@ -104,7 +104,7 @@ EmuTCPConnection::EmuTCPConnection(uint32 ID, EmuTCPServer* iServer, EmuTCPConne
|
|||||||
RelayCount = 0;
|
RelayCount = 0;
|
||||||
RemoteID = iRemoteID;
|
RemoteID = iRemoteID;
|
||||||
pOldFormat = false;
|
pOldFormat = false;
|
||||||
ConnectionType = Incomming;
|
ConnectionType = Incoming;
|
||||||
TCPMode = modePacket;
|
TCPMode = modePacket;
|
||||||
PacketMode = packetModeZone;
|
PacketMode = packetModeZone;
|
||||||
#if TCPN_DEBUG_Memory >= 7
|
#if TCPN_DEBUG_Memory >= 7
|
||||||
@ -714,7 +714,7 @@ void EmuTCPConnection::ProcessNetworkLayerPacket(ServerPacket* pack) {
|
|||||||
SendNetErrorPacket("Switch to RelayServer mode by a Relay Client");
|
SendNetErrorPacket("Switch to RelayServer mode by a Relay Client");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (ConnectionType != Incomming) {
|
if (ConnectionType != Incoming) {
|
||||||
SendNetErrorPacket("Switch to RelayServer mode on outgoing connection");
|
SendNetErrorPacket("Switch to RelayServer mode on outgoing connection");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -735,7 +735,7 @@ void EmuTCPConnection::ProcessNetworkLayerPacket(ServerPacket* pack) {
|
|||||||
SendNetErrorPacket("New RelayClient: wrong size, expected 11");
|
SendNetErrorPacket("New RelayClient: wrong size, expected 11");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (ConnectionType != Incomming) {
|
if (ConnectionType != Incoming) {
|
||||||
SendNetErrorPacket("New RelayClient: illegal on outgoing connection");
|
SendNetErrorPacket("New RelayClient: illegal on outgoing connection");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -755,7 +755,7 @@ void EmuTCPConnection::ProcessNetworkLayerPacket(ServerPacket* pack) {
|
|||||||
}
|
}
|
||||||
EmuTCPConnection* con = Server->FindConnection(*((uint32*)data));
|
EmuTCPConnection* con = Server->FindConnection(*((uint32*)data));
|
||||||
if (con) {
|
if (con) {
|
||||||
if (ConnectionType == Incomming) {
|
if (ConnectionType == Incoming) {
|
||||||
if (con->GetRelayLink() != this) {
|
if (con->GetRelayLink() != this) {
|
||||||
SendNetErrorPacket("Delete RelayClient: RelayLink != this");
|
SendNetErrorPacket("Delete RelayClient: RelayLink != this");
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -51,7 +51,7 @@
|
|||||||
#define ServerOP_AcceptWorldEntrance 0x0024
|
#define ServerOP_AcceptWorldEntrance 0x0024
|
||||||
#define ServerOP_ZAAuth 0x0025
|
#define ServerOP_ZAAuth 0x0025
|
||||||
#define ServerOP_ZAAuthFailed 0x0026
|
#define ServerOP_ZAAuthFailed 0x0026
|
||||||
#define ServerOP_ZoneIncClient 0x0027 // Incomming client
|
#define ServerOP_ZoneIncClient 0x0027 // Incoming client
|
||||||
#define ServerOP_ClientListKA 0x0028
|
#define ServerOP_ClientListKA 0x0028
|
||||||
#define ServerOP_ChangeWID 0x0029
|
#define ServerOP_ChangeWID 0x0029
|
||||||
#define ServerOP_IPLookup 0x002A
|
#define ServerOP_IPLookup 0x002A
|
||||||
@ -307,7 +307,7 @@ struct ServerZoneStateChange_struct {
|
|||||||
bool makestatic;
|
bool makestatic;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ServerZoneIncommingClient_Struct {
|
struct ServerZoneIncomingClient_Struct {
|
||||||
uint32 zoneid; // in case the zone shut down, boot it back up
|
uint32 zoneid; // in case the zone shut down, boot it back up
|
||||||
uint16 instanceid; // instance id if it exists for booting up
|
uint16 instanceid; // instance id if it exists for booting up
|
||||||
uint32 ip; // client's IP address
|
uint32 ip; // client's IP address
|
||||||
|
|||||||
@ -69,7 +69,7 @@ TCPConnection::TCPConnection()
|
|||||||
|
|
||||||
//server version
|
//server version
|
||||||
TCPConnection::TCPConnection(uint32 ID, SOCKET in_socket, uint32 irIP, uint16 irPort)
|
TCPConnection::TCPConnection(uint32 ID, SOCKET in_socket, uint32 irIP, uint16 irPort)
|
||||||
: ConnectionType(Incomming),
|
: ConnectionType(Incoming),
|
||||||
connection_socket(in_socket),
|
connection_socket(in_socket),
|
||||||
id(ID),
|
id(ID),
|
||||||
rIP(irIP),
|
rIP(irIP),
|
||||||
@ -104,7 +104,7 @@ TCPConnection::~TCPConnection() {
|
|||||||
}
|
}
|
||||||
#if TCPN_DEBUG_Memory >= 5
|
#if TCPN_DEBUG_Memory >= 5
|
||||||
else {
|
else {
|
||||||
std::cout << "Deconstructor on incomming TCP# " << GetID() << std::endl;
|
std::cout << "Deconstructor on incoming TCP# " << GetID() << std::endl;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
safe_delete_array(recvbuf);
|
safe_delete_array(recvbuf);
|
||||||
|
|||||||
@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
#ifndef DEF_eConnectionType
|
#ifndef DEF_eConnectionType
|
||||||
#define DEF_eConnectionType
|
#define DEF_eConnectionType
|
||||||
enum eConnectionType {Incomming, Outgoing};
|
enum eConnectionType {Incoming, Outgoing};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1069,10 +1069,6 @@ void Client::EnterWorld(bool TryBootup) {
|
|||||||
if (zoneID == 0)
|
if (zoneID == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(!cle) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ZoneServer* zs = nullptr;
|
ZoneServer* zs = nullptr;
|
||||||
if(instanceID > 0)
|
if(instanceID > 0)
|
||||||
{
|
{
|
||||||
@ -1107,7 +1103,7 @@ void Client::EnterWorld(bool TryBootup) {
|
|||||||
const char *zone_name=database.GetZoneName(zoneID, true);
|
const char *zone_name=database.GetZoneName(zoneID, true);
|
||||||
if (zs) {
|
if (zs) {
|
||||||
// warn the world we're comming, so it knows not to shutdown
|
// warn the world we're comming, so it knows not to shutdown
|
||||||
zs->IncommingClient(this);
|
zs->IncomingClient(this);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (TryBootup) {
|
if (TryBootup) {
|
||||||
@ -1121,13 +1117,17 @@ void Client::EnterWorld(bool TryBootup) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Log.Out(Logs::Detail, Logs::World_Server,"Requested zone %s is no running.",zone_name);
|
Log.Out(Logs::Detail, Logs::World_Server,"Requested zone %s is not running.",zone_name);
|
||||||
ZoneUnavail();
|
ZoneUnavail();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pwaitingforbootup = 0;
|
pwaitingforbootup = 0;
|
||||||
|
|
||||||
|
if(!cle) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
cle->SetChar(charid, char_name);
|
cle->SetChar(charid, char_name);
|
||||||
database.UpdateLiveChar(char_name, GetAccountID());
|
database.UpdateLiveChar(char_name, GetAccountID());
|
||||||
Log.Out(Logs::Detail, Logs::World_Server,"%s %s (%d:%d)",seencharsel ? "Entering zone" : "Zoning to",zone_name,zoneID,instanceID);
|
Log.Out(Logs::Detail, Logs::World_Server,"%s %s (%d:%d)",seencharsel ? "Entering zone" : "Zoning to",zone_name,zoneID,instanceID);
|
||||||
|
|||||||
@ -1405,10 +1405,10 @@ void ZoneServer::TriggerBootup(uint32 iZoneID, uint32 iInstanceID, const char* a
|
|||||||
LSBootUpdate(iZoneID, iInstanceID);
|
LSBootUpdate(iZoneID, iInstanceID);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZoneServer::IncommingClient(Client* client) {
|
void ZoneServer::IncomingClient(Client* client) {
|
||||||
BootingUp = true;
|
BootingUp = true;
|
||||||
auto pack = new ServerPacket(ServerOP_ZoneIncClient, sizeof(ServerZoneIncommingClient_Struct));
|
auto pack = new ServerPacket(ServerOP_ZoneIncClient, sizeof(ServerZoneIncomingClient_Struct));
|
||||||
ServerZoneIncommingClient_Struct* s = (ServerZoneIncommingClient_Struct*) pack->pBuffer;
|
ServerZoneIncomingClient_Struct* s = (ServerZoneIncomingClient_Struct*) pack->pBuffer;
|
||||||
s->zoneid = GetZoneID();
|
s->zoneid = GetZoneID();
|
||||||
s->instanceid = GetInstanceID();
|
s->instanceid = GetInstanceID();
|
||||||
s->wid = client->GetWID();
|
s->wid = client->GetWID();
|
||||||
|
|||||||
@ -40,7 +40,7 @@ public:
|
|||||||
bool SetZone(uint32 iZoneID, uint32 iInstanceID = 0, bool iStaticZone = false);
|
bool SetZone(uint32 iZoneID, uint32 iInstanceID = 0, bool iStaticZone = false);
|
||||||
void TriggerBootup(uint32 iZoneID = 0, uint32 iInstanceID = 0, const char* iAdminName = 0, bool iMakeStatic = false);
|
void TriggerBootup(uint32 iZoneID = 0, uint32 iInstanceID = 0, const char* iAdminName = 0, bool iMakeStatic = false);
|
||||||
void Disconnect() { tcpc->Disconnect(); }
|
void Disconnect() { tcpc->Disconnect(); }
|
||||||
void IncommingClient(Client* client);
|
void IncomingClient(Client* client);
|
||||||
void LSBootUpdate(uint32 zoneid, uint32 iInstanceID = 0, bool startup = false);
|
void LSBootUpdate(uint32 zoneid, uint32 iInstanceID = 0, bool startup = false);
|
||||||
void LSSleepUpdate(uint32 zoneid);
|
void LSSleepUpdate(uint32 zoneid);
|
||||||
void LSShutDownUpdate(uint32 zoneid);
|
void LSShutDownUpdate(uint32 zoneid);
|
||||||
|
|||||||
@ -2976,7 +2976,7 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses* ne
|
|||||||
//Special custom cases for loading effects on to NPC from 'npc_spels_effects' table
|
//Special custom cases for loading effects on to NPC from 'npc_spels_effects' table
|
||||||
if (IsAISpellEffect) {
|
if (IsAISpellEffect) {
|
||||||
|
|
||||||
//Non-Focused Effect to modify incomming spell damage by resist type.
|
//Non-Focused Effect to modify incoming spell damage by resist type.
|
||||||
case SE_FcSpellVulnerability:
|
case SE_FcSpellVulnerability:
|
||||||
ModVulnerability(base2, effect_value);
|
ModVulnerability(base2, effect_value);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -473,7 +473,7 @@ void WorldServer::Process() {
|
|||||||
if (ZoneLoaded) {
|
if (ZoneLoaded) {
|
||||||
SetZone(zone->GetZoneID(), zone->GetInstanceID());
|
SetZone(zone->GetZoneID(), zone->GetInstanceID());
|
||||||
if (zst->zoneid == zone->GetZoneID()) {
|
if (zst->zoneid == zone->GetZoneID()) {
|
||||||
// This packet also doubles as "incomming client" notification, lets not shut down before they get here
|
// This packet also doubles as "incoming client" notification, lets not shut down before they get here
|
||||||
zone->StartShutdownTimer(AUTHENTICATION_TIMEOUT * 1000);
|
zone->StartShutdownTimer(AUTHENTICATION_TIMEOUT * 1000);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -488,22 +488,19 @@ void WorldServer::Process() {
|
|||||||
if (!(Zone::Bootup(zst->zoneid, zst->instanceid, zst->makestatic))) {
|
if (!(Zone::Bootup(zst->zoneid, zst->instanceid, zst->makestatic))) {
|
||||||
SendChannelMessage(0, 0, 10, 0, 0, "%s:%i Zone::Bootup failed: %s", net.GetZoneAddress(), net.GetZonePort(), database.GetZoneName(zst->zoneid));
|
SendChannelMessage(0, 0, 10, 0, 0, "%s:%i Zone::Bootup failed: %s", net.GetZoneAddress(), net.GetZonePort(), database.GetZoneName(zst->zoneid));
|
||||||
}
|
}
|
||||||
// Moved annoucement to ZoneBootup()
|
|
||||||
// else
|
|
||||||
// SendEmoteMessage(0, 0, 15, "Zone bootup: %s", zone->GetLongName());
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ServerOP_ZoneIncClient: {
|
case ServerOP_ZoneIncClient: {
|
||||||
if (pack->size != sizeof(ServerZoneIncommingClient_Struct)) {
|
if (pack->size != sizeof(ServerZoneIncomingClient_Struct)) {
|
||||||
std::cout << "Wrong size on ServerOP_ZoneIncClient. Got: " << pack->size << ", Expected: " << sizeof(ServerZoneIncommingClient_Struct) << std::endl;
|
std::cout << "Wrong size on ServerOP_ZoneIncClient. Got: " << pack->size << ", Expected: " << sizeof(ServerZoneIncomingClient_Struct) << std::endl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ServerZoneIncommingClient_Struct* szic = (ServerZoneIncommingClient_Struct*) pack->pBuffer;
|
ServerZoneIncomingClient_Struct* szic = (ServerZoneIncomingClient_Struct*) pack->pBuffer;
|
||||||
if (ZoneLoaded) {
|
if (ZoneLoaded) {
|
||||||
SetZone(zone->GetZoneID(), zone->GetInstanceID());
|
SetZone(zone->GetZoneID(), zone->GetInstanceID());
|
||||||
if (szic->zoneid == zone->GetZoneID()) {
|
if (szic->zoneid == zone->GetZoneID()) {
|
||||||
zone->AddAuth(szic);
|
zone->AddAuth(szic);
|
||||||
// This packet also doubles as "incomming client" notification, lets not shut down before they get here
|
// This packet also doubles as "incoming client" notification, lets not shut down before they get here
|
||||||
zone->StartShutdownTimer(AUTHENTICATION_TIMEOUT * 1000);
|
zone->StartShutdownTimer(AUTHENTICATION_TIMEOUT * 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1086,7 +1086,7 @@ bool Zone::SaveZoneCFG() {
|
|||||||
return database.SaveZoneCFG(GetZoneID(), GetInstanceVersion(), &newzone_data);
|
return database.SaveZoneCFG(GetZoneID(), GetInstanceVersion(), &newzone_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Zone::AddAuth(ServerZoneIncommingClient_Struct* szic) {
|
void Zone::AddAuth(ServerZoneIncomingClient_Struct* szic) {
|
||||||
ZoneClientAuth_Struct* zca = new ZoneClientAuth_Struct;
|
ZoneClientAuth_Struct* zca = new ZoneClientAuth_Struct;
|
||||||
memset(zca, 0, sizeof(ZoneClientAuth_Struct));
|
memset(zca, 0, sizeof(ZoneClientAuth_Struct));
|
||||||
zca->ip = szic->ip;
|
zca->ip = szic->ip;
|
||||||
|
|||||||
@ -84,7 +84,7 @@ class PathManager;
|
|||||||
class WaterMap;
|
class WaterMap;
|
||||||
extern EntityList entity_list;
|
extern EntityList entity_list;
|
||||||
struct NPCType;
|
struct NPCType;
|
||||||
struct ServerZoneIncommingClient_Struct;
|
struct ServerZoneIncomingClient_Struct;
|
||||||
|
|
||||||
class Zone
|
class Zone
|
||||||
{
|
{
|
||||||
@ -149,7 +149,7 @@ public:
|
|||||||
void StartShutdownTimer(uint32 set_time = (RuleI(Zone, AutoShutdownDelay)));
|
void StartShutdownTimer(uint32 set_time = (RuleI(Zone, AutoShutdownDelay)));
|
||||||
void ChangeWeather();
|
void ChangeWeather();
|
||||||
bool HasWeather();
|
bool HasWeather();
|
||||||
void AddAuth(ServerZoneIncommingClient_Struct* szic);
|
void AddAuth(ServerZoneIncomingClient_Struct* szic);
|
||||||
void RemoveAuth(const char* iCharName);
|
void RemoveAuth(const char* iCharName);
|
||||||
void ResetAuth();
|
void ResetAuth();
|
||||||
bool GetAuth(uint32 iIP, const char* iCharName, uint32* oWID = 0, uint32* oAccID = 0, uint32* oCharID = 0, int16* oStatus = 0, char* oLSKey = 0, bool* oTellsOff = 0);
|
bool GetAuth(uint32 iIP, const char* iCharName, uint32* oWID = 0, uint32* oAccID = 0, uint32* oCharID = 0, int16* oStatus = 0, char* oLSKey = 0, bool* oTellsOff = 0);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user