mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
Add log aliases to make logging much easier to use (All FMT driven)
This commit is contained in:
parent
db5e511af3
commit
d3803045bc
@ -142,6 +142,7 @@ SET(common_headers
|
||||
eqemu_config.h
|
||||
eqemu_config_elements.h
|
||||
eqemu_logsys.h
|
||||
eqemu_logsys_log_aliases.h
|
||||
eq_limits.h
|
||||
eq_packet.h
|
||||
eq_stream_ident.h
|
||||
|
||||
@ -252,7 +252,7 @@ uint32 Database::CreateAccount(
|
||||
|
||||
bool Database::DeleteAccount(const char* name, const char *loginserver) {
|
||||
std::string query = StringFormat("DELETE FROM account WHERE name='%s' AND ls_id='%s'", name, loginserver);
|
||||
Log(Logs::General, Logs::World_Server, "Account Attempting to be deleted:'%s:%s'", loginserver, name);
|
||||
Log(Logs::General, Logs::WorldServer, "Account Attempting to be deleted:'%s:%s'", loginserver, name);
|
||||
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
@ -299,7 +299,7 @@ bool Database::ReserveName(uint32 account_id, char* name) {
|
||||
auto results = QueryDatabase(query);
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
if (row[0] && atoi(row[0]) > 0){
|
||||
Log(Logs::General, Logs::World_Server, "Account: %i tried to request name: %s, but it is already taken...", account_id, name);
|
||||
Log(Logs::General, Logs::WorldServer, "Account: %i tried to request name: %s, but it is already taken...", account_id, name);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -317,10 +317,10 @@ bool Database::ReserveName(uint32 account_id, char* name) {
|
||||
bool Database::DeleteCharacter(char *name) {
|
||||
uint32 charid = 0;
|
||||
if(!name || !strlen(name)) {
|
||||
Log(Logs::General, Logs::World_Server, "DeleteCharacter: request to delete without a name (empty char slot)");
|
||||
Log(Logs::General, Logs::WorldServer, "DeleteCharacter: request to delete without a name (empty char slot)");
|
||||
return false;
|
||||
}
|
||||
Log(Logs::General, Logs::World_Server, "Database::DeleteCharacter name : '%s'", name);
|
||||
Log(Logs::General, Logs::WorldServer, "Database::DeleteCharacter name : '%s'", name);
|
||||
|
||||
/* Get id from character_data before deleting record so we can clean up the rest of the tables */
|
||||
std::string query = StringFormat("SELECT `id` from `character_data` WHERE `name` = '%s'", name);
|
||||
@ -2237,7 +2237,7 @@ struct TimeOfDay_Struct Database::LoadTime(time_t &realtime)
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
if (!results.Success() || results.RowCount() == 0){
|
||||
Log(Logs::Detail, Logs::World_Server, "Loading EQ time of day failed. Using defaults.");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Loading EQ time of day failed. Using defaults.");
|
||||
eqTime.minute = 0;
|
||||
eqTime.hour = 9;
|
||||
eqTime.day = 1;
|
||||
|
||||
@ -42,8 +42,8 @@ void EQStreamProxy::QueuePacket(const EQApplicationPacket *p, bool ack_req) {
|
||||
return;
|
||||
|
||||
if (p->GetOpcode() != OP_SpecialMesg) {
|
||||
Log(Logs::General, Logs::Server_Client_Packet, "[%s - 0x%04x] [Size: %u]", OpcodeManager::EmuToName(p->GetOpcode()), p->GetOpcode(), p->Size());
|
||||
Log(Logs::General, Logs::Server_Client_Packet_With_Dump, "[%s - 0x%04x] [Size: %u] %s", OpcodeManager::EmuToName(p->GetOpcode()), p->GetOpcode(), p->Size(), DumpPacketToString(p).c_str());
|
||||
Log(Logs::General, Logs::PacketServerClient, "[%s - 0x%04x] [Size: %u]", OpcodeManager::EmuToName(p->GetOpcode()), p->GetOpcode(), p->Size());
|
||||
Log(Logs::General, Logs::PacketServerClientWithDump, "[%s - 0x%04x] [Size: %u] %s", OpcodeManager::EmuToName(p->GetOpcode()), p->GetOpcode(), p->Size(), DumpPacketToString(p).c_str());
|
||||
}
|
||||
|
||||
EQApplicationPacket *newp = p->Copy();
|
||||
|
||||
@ -115,15 +115,15 @@ void EQEmuLogSys::LoadLogSettingsDefaults()
|
||||
/**
|
||||
* Set Defaults
|
||||
*/
|
||||
log_settings[Logs::World_Server].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::Zone_Server].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::QS_Server].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::UCS_Server].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::Crash].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::MySQLError].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::Login_Server].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::Headless_Client].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::NPCScaling].log_to_gmsay = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::WorldServer].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::ZoneServer].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::QSServer].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::UCSServer].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::Crash].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::MySQLError].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::Loginserver].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::HeadlessClient].log_to_console = static_cast<uint8>(Logs::General);
|
||||
log_settings[Logs::NPCScaling].log_to_gmsay = static_cast<uint8>(Logs::General);
|
||||
|
||||
/**
|
||||
* RFC 5424
|
||||
|
||||
@ -53,7 +53,7 @@ namespace Logs {
|
||||
AI,
|
||||
Aggro,
|
||||
Attack,
|
||||
Client_Server_Packet,
|
||||
PacketClientServer,
|
||||
Combat,
|
||||
Commands,
|
||||
Crash,
|
||||
@ -67,34 +67,34 @@ namespace Logs {
|
||||
Normal,
|
||||
Object,
|
||||
Pathing,
|
||||
QS_Server,
|
||||
QSServer,
|
||||
Quests,
|
||||
Rules,
|
||||
Skills,
|
||||
Spawns,
|
||||
Spells,
|
||||
Status,
|
||||
TCP_Connection,
|
||||
TCPConnection,
|
||||
Tasks,
|
||||
Tradeskills,
|
||||
Trading,
|
||||
Tribute,
|
||||
UCS_Server,
|
||||
WebInterface_Server,
|
||||
World_Server,
|
||||
Zone_Server,
|
||||
UCSServer,
|
||||
WebInterfaceServer,
|
||||
WorldServer,
|
||||
ZoneServer,
|
||||
MySQLError,
|
||||
MySQLQuery,
|
||||
Mercenaries,
|
||||
QuestDebug,
|
||||
Server_Client_Packet,
|
||||
Client_Server_Packet_Unhandled,
|
||||
Server_Client_Packet_With_Dump,
|
||||
Client_Server_Packet_With_Dump,
|
||||
Login_Server,
|
||||
Client_Login,
|
||||
Headless_Client,
|
||||
HP_Update,
|
||||
PacketServerClient,
|
||||
PacketClientServerUnhandled,
|
||||
PacketServerClientWithDump,
|
||||
PacketClientServerWithDump,
|
||||
Loginserver,
|
||||
ClientLogin,
|
||||
HeadlessClient,
|
||||
HPUpdate,
|
||||
FixZ,
|
||||
Food,
|
||||
Traps,
|
||||
@ -176,69 +176,7 @@ namespace Logs {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* RFC 5424
|
||||
*/
|
||||
|
||||
#define LogEmergency(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Emergency].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Emergency, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogAlert(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Alert].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Alert, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogCritical(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Critical].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Critical, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogError(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Error].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Error, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogWarning(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Warning].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Warning, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogNotice(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Notice].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Notice, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogInfo(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Info].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Info, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogDebug(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Debug].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Debug, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
* Other
|
||||
*/
|
||||
|
||||
#define LogStatus(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Status].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Status, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define Log(debug_level, log_category, message, ...) do {\
|
||||
if (LogSys.log_settings[log_category].is_category_enabled == 1)\
|
||||
LogSys.Out(debug_level, log_category, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogF(debug_level, log_category, message, ...) do {\
|
||||
if (LogSys.log_settings[log_category].is_category_enabled == 1)\
|
||||
OutF(LogSys, debug_level, log_category, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#include "eqemu_logsys_log_aliases.h"
|
||||
|
||||
class EQEmuLogSys {
|
||||
public:
|
||||
|
||||
507
common/eqemu_logsys_log_aliases.h
Normal file
507
common/eqemu_logsys_log_aliases.h
Normal file
@ -0,0 +1,507 @@
|
||||
/**
|
||||
* EQEmulator: Everquest Server Emulator
|
||||
* Copyright (C) 2001-2019 EQEmulator Development Team (https://github.com/EQEmu/Server)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
* are required to give you total support for your newly bought product;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef EQEMU_EQEMU_LOGSYS_LOG_ALIASES_H
|
||||
#define EQEMU_EQEMU_LOGSYS_LOG_ALIASES_H
|
||||
|
||||
/**
|
||||
* RFC 5424
|
||||
*/
|
||||
|
||||
#define LogEmergency(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Emergency].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Emergency, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogAlert(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Alert].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Alert, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogCritical(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Critical].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Critical, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogError(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Error].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Error, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogWarning(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Warning].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Warning, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogNotice(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Notice].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Notice, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogInfo(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Info].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Info, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogDebug(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Debug].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Debug, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
* Category
|
||||
*/
|
||||
|
||||
#define LogAA(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::AA].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::AA, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogAADetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::AA].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::AA, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogAI(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::AI].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::AI, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogAIDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::AI].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::AI, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogAggro(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Aggro].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Aggro, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogAggroDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Aggro].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Aggro, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogAttack(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Attack].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Attack, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogAttackDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Attack].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Attack, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogPacketClientServer(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::PacketClientServer].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::PacketClientServer, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogPacketClientServerDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::PacketClientServer].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::PacketClientServer, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogCombat(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Combat].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Combat, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogCombatDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Combat].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Combat, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogCommands(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Commands].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Commands, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogCommandsDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Commands].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Commands, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogCrash(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Crash].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Crash, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogCrashDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Crash].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Crash, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogDoors(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Doors].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Doors, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogDoorsDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Doors].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Doors, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogGuilds(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Guilds].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Guilds, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogGuildsDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Guilds].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Guilds, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogInventory(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Inventory].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Inventory, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogInventoryDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Inventory].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Inventory, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogLauncher(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Launcher].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Launcher, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogLauncherDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Launcher].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Launcher, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogNetcode(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Netcode].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Netcode, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogNetcodeDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Netcode].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Netcode, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogNormal(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Normal].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Normal, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogNormalDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Normal].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Normal, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogObject(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Object].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Object, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogObjectDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Object].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Object, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogPathing(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Pathing].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Pathing, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogPathingDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Pathing].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Pathing, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogQSServer(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::QSServer].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::QSServer, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogQSServerDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::QSServer].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::QSServer, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogQuests(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Quests].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Quests, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogQuestsDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Quests].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Quests, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogRules(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Rules].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Rules, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogRulesDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Rules].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Rules, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogSkills(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Skills].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Skills, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogSkillsDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Skills].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Skills, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogSpawns(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Spawns].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Spawns, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogSpawnsDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Spawns].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Spawns, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogSpells(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Spells].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Spells, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogSpellsDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Spells].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Spells, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogTCPConnection(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::TCPConnection].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::TCPConnection, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogTCPConnectionDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::TCPConnection].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::TCPConnection, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogTasks(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Tasks].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Tasks, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogTasksDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Tasks].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Tasks, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogTradeskills(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Tradeskills].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Tradeskills, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogTradeskillsDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Tradeskills].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Tradeskills, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogTrading(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Trading].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Trading, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogTradingDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Trading].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Trading, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogTribute(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Tribute].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Tribute, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogTributeDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Tribute].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Tribute, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogMySQLError(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::MySQLError].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::MySQLError, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogMySQLErrorDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::MySQLError].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::MySQLError, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogMySQLQuery(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::MySQLQuery].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::MySQLQuery, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogMySQLQueryDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::MySQLQuery].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::MySQLQuery, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogMercenaries(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Mercenaries].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Mercenaries, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogMercenariesDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Mercenaries].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Mercenaries, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogQuestDebug(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::QuestDebug].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::QuestDebug, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogQuestDebugDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::QuestDebug].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::QuestDebug, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogLoginserver(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Loginserver].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Loginserver, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogLoginserverDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Loginserver].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Loginserver, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogClientLogin(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::ClientLogin].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::ClientLogin, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogClientLoginDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::ClientLogin].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::ClientLogin, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogHeadlessClient(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::HeadlessClient].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::HeadlessClient, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogHeadlessClientDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::HeadlessClient].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::HeadlessClient, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogHPUpdate(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::HPUpdate].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::HPUpdate, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogHPUpdateDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::HPUpdate].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::HPUpdate, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogFixZ(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::FixZ].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::FixZ, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogFixZDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::FixZ].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::FixZ, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogFood(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Food].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Food, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogFoodDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Food].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Food, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogTraps(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Traps].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Traps, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogTrapsDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Traps].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Traps, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogNPCRoamBox(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::NPCRoamBox].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::NPCRoamBox, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogNPCRoamBoxDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::NPCRoamBox].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::NPCRoamBox, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogNPCScaling(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::NPCScaling].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::NPCScaling, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogNPCScalingDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::NPCScaling].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::NPCScaling, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogMobAppearance(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::MobAppearance].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::MobAppearance, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogMobAppearanceDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::MobAppearance].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::MobAppearance, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogStatus(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Status].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::General, Logs::Status, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogStatusDetail(message, ...) do {\
|
||||
if (LogSys.log_settings[Logs::Status].is_category_enabled == 1)\
|
||||
OutF(LogSys, Logs::Detail, Logs::Status, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
* Misc
|
||||
*/
|
||||
|
||||
#define Log(debug_level, log_category, message, ...) do {\
|
||||
if (LogSys.log_settings[log_category].is_category_enabled == 1)\
|
||||
LogSys.Out(debug_level, log_category, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
#define LogF(debug_level, log_category, message, ...) do {\
|
||||
if (LogSys.log_settings[log_category].is_category_enabled == 1)\
|
||||
OutF(LogSys, debug_level, log_category, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
|
||||
} while (0)
|
||||
|
||||
|
||||
#endif //EQEMU_EQEMU_LOGSYS_LOG_ALIASES_H
|
||||
@ -78,15 +78,15 @@ void EQ::Net::ServertalkClient::Connect()
|
||||
m_connecting = true;
|
||||
EQ::Net::TCPConnection::Connect(m_addr, m_port, false, [this](std::shared_ptr<EQ::Net::TCPConnection> connection) {
|
||||
if (connection == nullptr) {
|
||||
LogF(Logs::General, Logs::TCP_Connection, "Error connecting to {0}:{1}, attempting to reconnect...", m_addr, m_port);
|
||||
LogF(Logs::General, Logs::TCPConnection, "Error connecting to {0}:{1}, attempting to reconnect...", m_addr, m_port);
|
||||
m_connecting = false;
|
||||
return;
|
||||
}
|
||||
|
||||
LogF(Logs::General, Logs::TCP_Connection, "Connected to {0}:{1}", m_addr, m_port);
|
||||
LogF(Logs::General, Logs::TCPConnection, "Connected to {0}:{1}", m_addr, m_port);
|
||||
m_connection = connection;
|
||||
m_connection->OnDisconnect([this](EQ::Net::TCPConnection *c) {
|
||||
LogF(Logs::General, Logs::TCP_Connection, "Connection lost to {0}:{1}, attempting to reconnect...", m_addr, m_port);
|
||||
LogF(Logs::General, Logs::TCPConnection, "Connection lost to {0}:{1}, attempting to reconnect...", m_addr, m_port);
|
||||
m_encrypted = false;
|
||||
m_connection.reset();
|
||||
});
|
||||
|
||||
@ -58,15 +58,15 @@ void EQ::Net::ServertalkLegacyClient::Connect()
|
||||
m_connecting = true;
|
||||
EQ::Net::TCPConnection::Connect(m_addr, m_port, false, [this](std::shared_ptr<EQ::Net::TCPConnection> connection) {
|
||||
if (connection == nullptr) {
|
||||
LogF(Logs::General, Logs::TCP_Connection, "Error connecting to {0}:{1}, attempting to reconnect...", m_addr, m_port);
|
||||
LogF(Logs::General, Logs::TCPConnection, "Error connecting to {0}:{1}, attempting to reconnect...", m_addr, m_port);
|
||||
m_connecting = false;
|
||||
return;
|
||||
}
|
||||
|
||||
LogF(Logs::General, Logs::TCP_Connection, "Connected to {0}:{1}", m_addr, m_port);
|
||||
LogF(Logs::General, Logs::TCPConnection, "Connected to {0}:{1}", m_addr, m_port);
|
||||
m_connection = connection;
|
||||
m_connection->OnDisconnect([this](EQ::Net::TCPConnection *c) {
|
||||
LogF(Logs::General, Logs::TCP_Connection, "Connection lost to {0}:{1}, attempting to reconnect...", m_addr, m_port);
|
||||
LogF(Logs::General, Logs::TCPConnection, "Connection lost to {0}:{1}, attempting to reconnect...", m_addr, m_port);
|
||||
m_connection.reset();
|
||||
});
|
||||
|
||||
|
||||
@ -201,8 +201,8 @@ void EQ::Net::ServertalkServerConnection::ProcessHandshake(EQ::Net::Packet &p, b
|
||||
{
|
||||
#ifdef ENABLE_SECURITY
|
||||
if (downgrade_security && m_allow_downgrade && m_encrypted) {
|
||||
LogF(Logs::General, Logs::TCP_Connection, "Downgraded encrypted connection to plaintext because otherside didn't support encryption {0}:{1}",
|
||||
m_connection->RemoteIP(), m_connection->RemotePort());
|
||||
LogF(Logs::General, Logs::TCPConnection, "Downgraded encrypted connection to plaintext because otherside didn't support encryption {0}:{1}",
|
||||
m_connection->RemoteIP(), m_connection->RemotePort());
|
||||
m_encrypted = false;
|
||||
}
|
||||
|
||||
|
||||
@ -103,7 +103,7 @@ bool Client::Process()
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
if (LogSys.log_settings[Logs::Client_Server_Packet_Unhandled].is_category_enabled == 1) {
|
||||
if (LogSys.log_settings[Logs::PacketClientServerUnhandled].is_category_enabled == 1) {
|
||||
char dump[64];
|
||||
app->build_header_dump(dump);
|
||||
LogError("Recieved unhandled application packet from the client: %s.", dump);
|
||||
|
||||
@ -178,7 +178,7 @@ int main(int argc, char **argv)
|
||||
#endif
|
||||
|
||||
LogInfo("Server Started");
|
||||
if (LogSys.log_settings[Logs::Login_Server].log_to_console == 1) {
|
||||
if (LogSys.log_settings[Logs::Loginserver].log_to_console == 1) {
|
||||
LogInfo("Loginserver logging set to level [1] for more debugging, enable detail [3]");
|
||||
}
|
||||
|
||||
|
||||
@ -116,8 +116,8 @@ void Database::AddSpeech(const char* from, const char* to, const char* message,
|
||||
safe_delete_array(escapedMessage);
|
||||
auto results = QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log(Logs::Detail, Logs::QS_Server, "Failed Speech Entry Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QS_Server, "%s", query.c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "Failed Speech Entry Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "%s", query.c_str());
|
||||
}
|
||||
|
||||
|
||||
@ -132,8 +132,8 @@ void Database::LogPlayerDropItem(QSPlayerDropItem_Struct* QS) {
|
||||
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log(Logs::Detail, Logs::QS_Server, "Failed Drop Record Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QS_Server, "%s", query.c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "Failed Drop Record Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "%s", query.c_str());
|
||||
}
|
||||
|
||||
if (QS->_detail_count == 0)
|
||||
@ -150,8 +150,8 @@ void Database::LogPlayerDropItem(QSPlayerDropItem_Struct* QS) {
|
||||
QS->items[i].aug_3, QS->items[i].aug_4, QS->items[i].aug_5);
|
||||
results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log(Logs::Detail, Logs::QS_Server, "Failed Drop Record Entry Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QS_Server, "%s", query.c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "Failed Drop Record Entry Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "%s", query.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -169,8 +169,8 @@ void Database::LogPlayerTrade(QSPlayerLogTrade_Struct* QS, uint32 detailCount) {
|
||||
QS->char2_money.silver, QS->char2_money.copper, QS->char2_count);
|
||||
auto results = QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log(Logs::Detail, Logs::QS_Server, "Failed Trade Log Record Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QS_Server, "%s", query.c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "Failed Trade Log Record Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "%s", query.c_str());
|
||||
}
|
||||
|
||||
if(detailCount == 0)
|
||||
@ -189,8 +189,8 @@ void Database::LogPlayerTrade(QSPlayerLogTrade_Struct* QS, uint32 detailCount) {
|
||||
QS->items[i].aug_3, QS->items[i].aug_4, QS->items[i].aug_5);
|
||||
results = QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log(Logs::Detail, Logs::QS_Server, "Failed Trade Log Record Entry Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QS_Server, "%s", query.c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "Failed Trade Log Record Entry Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "%s", query.c_str());
|
||||
}
|
||||
|
||||
}
|
||||
@ -212,8 +212,8 @@ void Database::LogPlayerHandin(QSPlayerLogHandin_Struct* QS, uint32 detailCount)
|
||||
QS->npc_count);
|
||||
auto results = QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log(Logs::Detail, Logs::QS_Server, "Failed Handin Log Record Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QS_Server, "%s", query.c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "Failed Handin Log Record Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "%s", query.c_str());
|
||||
}
|
||||
|
||||
if(detailCount == 0)
|
||||
@ -231,8 +231,8 @@ void Database::LogPlayerHandin(QSPlayerLogHandin_Struct* QS, uint32 detailCount)
|
||||
QS->items[i].aug_2, QS->items[i].aug_3, QS->items[i].aug_4,
|
||||
QS->items[i].aug_5);
|
||||
if(!results.Success()) {
|
||||
Log(Logs::Detail, Logs::QS_Server, "Failed Handin Log Record Entry Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QS_Server, "%s", query.c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "Failed Handin Log Record Entry Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "%s", query.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@ -246,8 +246,8 @@ void Database::LogPlayerNPCKill(QSPlayerLogNPCKill_Struct* QS, uint32 members){
|
||||
QS->s1.NPCID, QS->s1.Type, QS->s1.ZoneID);
|
||||
auto results = QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log(Logs::Detail, Logs::QS_Server, "Failed NPC Kill Log Record Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QS_Server, "%s", query.c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "Failed NPC Kill Log Record Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "%s", query.c_str());
|
||||
}
|
||||
|
||||
if(members == 0)
|
||||
@ -261,8 +261,8 @@ void Database::LogPlayerNPCKill(QSPlayerLogNPCKill_Struct* QS, uint32 members){
|
||||
lastIndex, QS->Chars[i].char_id);
|
||||
auto results = QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log(Logs::Detail, Logs::QS_Server, "Failed NPC Kill Log Entry Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QS_Server, "%s", query.c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "Failed NPC Kill Log Entry Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "%s", query.c_str());
|
||||
}
|
||||
|
||||
}
|
||||
@ -276,8 +276,8 @@ void Database::LogPlayerDelete(QSPlayerLogDelete_Struct* QS, uint32 items) {
|
||||
QS->char_id, QS->stack_size, QS->char_count, QS->char_count);
|
||||
auto results = QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log(Logs::Detail, Logs::QS_Server, "Failed Delete Log Record Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QS_Server, "%s", query.c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "Failed Delete Log Record Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "%s", query.c_str());
|
||||
}
|
||||
|
||||
if(items == 0)
|
||||
@ -294,8 +294,8 @@ void Database::LogPlayerDelete(QSPlayerLogDelete_Struct* QS, uint32 items) {
|
||||
QS->items[i].aug_5);
|
||||
results = QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log(Logs::Detail, Logs::QS_Server, "Failed Delete Log Record Entry Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QS_Server, "%s", query.c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "Failed Delete Log Record Entry Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "%s", query.c_str());
|
||||
}
|
||||
|
||||
}
|
||||
@ -312,8 +312,8 @@ void Database::LogPlayerMove(QSPlayerLogMove_Struct* QS, uint32 items) {
|
||||
QS->char_count, QS->postaction);
|
||||
auto results = QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log(Logs::Detail, Logs::QS_Server, "Failed Move Log Record Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QS_Server, "%s", query.c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "Failed Move Log Record Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "%s", query.c_str());
|
||||
}
|
||||
|
||||
if(items == 0)
|
||||
@ -330,8 +330,8 @@ void Database::LogPlayerMove(QSPlayerLogMove_Struct* QS, uint32 items) {
|
||||
QS->items[i].aug_3, QS->items[i].aug_4, QS->items[i].aug_5);
|
||||
results = QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log(Logs::Detail, Logs::QS_Server, "Failed Move Log Record Entry Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QS_Server, "%s", query.c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "Failed Move Log Record Entry Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "%s", query.c_str());
|
||||
}
|
||||
|
||||
}
|
||||
@ -353,8 +353,8 @@ void Database::LogMerchantTransaction(QSMerchantLogTransaction_Struct* QS, uint3
|
||||
QS->char_money.copper, QS->char_count);
|
||||
auto results = QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log(Logs::Detail, Logs::QS_Server, "Failed Transaction Log Record Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QS_Server, "%s", query.c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "Failed Transaction Log Record Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "%s", query.c_str());
|
||||
}
|
||||
|
||||
if(items == 0)
|
||||
@ -371,8 +371,8 @@ void Database::LogMerchantTransaction(QSMerchantLogTransaction_Struct* QS, uint3
|
||||
QS->items[i].aug_5);
|
||||
results = QueryDatabase(query);
|
||||
if(!results.Success()) {
|
||||
Log(Logs::Detail, Logs::QS_Server, "Failed Transaction Log Record Entry Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QS_Server, "%s", query.c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "Failed Transaction Log Record Entry Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "%s", query.c_str());
|
||||
}
|
||||
|
||||
}
|
||||
@ -390,8 +390,8 @@ void Database::GeneralQueryReceive(ServerPacket *pack) {
|
||||
std::string query(queryBuffer);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log(Logs::Detail, Logs::QS_Server, "Failed Delete Log Record Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QS_Server, "%s", query.c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "Failed Delete Log Record Insert: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::QSServer, "%s", query.c_str());
|
||||
}
|
||||
|
||||
safe_delete_array(queryBuffer);
|
||||
|
||||
@ -52,16 +52,16 @@ int main() {
|
||||
set_exception_handler();
|
||||
Timer LFGuildExpireTimer(60000);
|
||||
|
||||
Log(Logs::General, Logs::QS_Server, "Starting EQEmu QueryServ.");
|
||||
Log(Logs::General, Logs::QSServer, "Starting EQEmu QueryServ.");
|
||||
if (!queryservconfig::LoadConfig()) {
|
||||
Log(Logs::General, Logs::QS_Server, "Loading server configuration failed.");
|
||||
Log(Logs::General, Logs::QSServer, "Loading server configuration failed.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
Config = queryservconfig::get();
|
||||
WorldShortName = Config->ShortName;
|
||||
|
||||
Log(Logs::General, Logs::QS_Server, "Connecting to MySQL...");
|
||||
Log(Logs::General, Logs::QSServer, "Connecting to MySQL...");
|
||||
|
||||
/* MySQL Connection */
|
||||
if (!database.Connect(
|
||||
@ -70,7 +70,7 @@ int main() {
|
||||
Config->QSDatabasePassword.c_str(),
|
||||
Config->QSDatabaseDB.c_str(),
|
||||
Config->QSDatabasePort)) {
|
||||
Log(Logs::General, Logs::QS_Server, "Cannot continue without a database connection.");
|
||||
Log(Logs::General, Logs::QSServer, "Cannot continue without a database connection.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -79,11 +79,11 @@ int main() {
|
||||
LogSys.StartFileLogs();
|
||||
|
||||
if (signal(SIGINT, CatchSignal) == SIG_ERR) {
|
||||
Log(Logs::General, Logs::QS_Server, "Could not set signal handler");
|
||||
Log(Logs::General, Logs::QSServer, "Could not set signal handler");
|
||||
return 1;
|
||||
}
|
||||
if (signal(SIGTERM, CatchSignal) == SIG_ERR) {
|
||||
Log(Logs::General, Logs::QS_Server, "Could not set signal handler");
|
||||
Log(Logs::General, Logs::QSServer, "Could not set signal handler");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@ -168,7 +168,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
break;
|
||||
}
|
||||
default:
|
||||
Log(Logs::Detail, Logs::QS_Server, "Received unhandled ServerOP_QueryServGeneric", Type);
|
||||
Log(Logs::Detail, Logs::QSServer, "Received unhandled ServerOP_QueryServGeneric", Type);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -47,8 +47,8 @@ ChatChannel::ChatChannel(std::string inName, std::string inOwner, std::string in
|
||||
|
||||
Moderated = false;
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "New ChatChannel created: Name: [%s], Owner: [%s], Password: [%s], MinStatus: %i",
|
||||
Name.c_str(), Owner.c_str(), Password.c_str(), MinimumStatus);
|
||||
Log(Logs::Detail, Logs::UCSServer, "New ChatChannel created: Name: [%s], Owner: [%s], Password: [%s], MinStatus: %i",
|
||||
Name.c_str(), Owner.c_str(), Password.c_str(), MinimumStatus);
|
||||
|
||||
}
|
||||
|
||||
@ -154,7 +154,7 @@ void ChatChannelList::SendAllChannels(Client *c) {
|
||||
|
||||
void ChatChannelList::RemoveChannel(ChatChannel *Channel) {
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "RemoveChannel(%s)", Channel->GetName().c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "RemoveChannel(%s)", Channel->GetName().c_str());
|
||||
|
||||
LinkedListIterator<ChatChannel*> iterator(ChatChannels);
|
||||
|
||||
@ -175,7 +175,7 @@ void ChatChannelList::RemoveChannel(ChatChannel *Channel) {
|
||||
|
||||
void ChatChannelList::RemoveAllChannels() {
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "RemoveAllChannels");
|
||||
Log(Logs::Detail, Logs::UCSServer, "RemoveAllChannels");
|
||||
|
||||
LinkedListIterator<ChatChannel*> iterator(ChatChannels);
|
||||
|
||||
@ -233,7 +233,7 @@ void ChatChannel::AddClient(Client *c) {
|
||||
|
||||
if(IsClientInChannel(c)) {
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Client %s already in channel %s", c->GetName().c_str(), GetName().c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Client %s already in channel %s", c->GetName().c_str(), GetName().c_str());
|
||||
|
||||
return;
|
||||
}
|
||||
@ -242,7 +242,7 @@ void ChatChannel::AddClient(Client *c) {
|
||||
|
||||
int AccountStatus = c->GetAccountStatus();
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Adding %s to channel %s", c->GetName().c_str(), Name.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Adding %s to channel %s", c->GetName().c_str(), Name.c_str());
|
||||
|
||||
LinkedListIterator<Client*> iterator(ClientsInChannel);
|
||||
|
||||
@ -267,7 +267,7 @@ bool ChatChannel::RemoveClient(Client *c) {
|
||||
|
||||
if(!c) return false;
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "RemoveClient %s from channel %s", c->GetName().c_str(), GetName().c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "RemoveClient %s from channel %s", c->GetName().c_str(), GetName().c_str());
|
||||
|
||||
bool HideMe = c->GetHideMe();
|
||||
|
||||
@ -304,7 +304,7 @@ bool ChatChannel::RemoveClient(Client *c) {
|
||||
if((Password.length() == 0) || (RuleI(Channels, DeleteTimer) == 0))
|
||||
return false;
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Starting delete timer for empty password protected channel %s", Name.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Starting delete timer for empty password protected channel %s", Name.c_str());
|
||||
|
||||
DeleteTimer.Start(RuleI(Channels, DeleteTimer) * 60000);
|
||||
}
|
||||
@ -402,8 +402,8 @@ void ChatChannel::SendMessageToChannel(std::string Message, Client* Sender) {
|
||||
|
||||
if(ChannelClient)
|
||||
{
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Sending message to %s from %s",
|
||||
ChannelClient->GetName().c_str(), Sender->GetName().c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Sending message to %s from %s",
|
||||
ChannelClient->GetName().c_str(), Sender->GetName().c_str());
|
||||
|
||||
if (cv_messages[static_cast<uint32>(ChannelClient->GetClientVersion())].length() == 0) {
|
||||
switch (ChannelClient->GetClientVersion()) {
|
||||
@ -505,7 +505,7 @@ ChatChannel *ChatChannelList::AddClientToChannel(std::string ChannelName, Client
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "AddClient to channel [%s] with password [%s]", NormalisedName.c_str(), Password.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "AddClient to channel [%s] with password [%s]", NormalisedName.c_str(), Password.c_str());
|
||||
|
||||
ChatChannel *RequiredChannel = FindChannel(NormalisedName);
|
||||
|
||||
@ -581,7 +581,7 @@ void ChatChannelList::Process() {
|
||||
|
||||
if(CurrentChannel && CurrentChannel->ReadyToDelete()) {
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Empty temporary password protected channel %s being destroyed.",
|
||||
Log(Logs::Detail, Logs::UCSServer, "Empty temporary password protected channel %s being destroyed.",
|
||||
CurrentChannel->GetName().c_str());
|
||||
|
||||
RemoveChannel(CurrentChannel);
|
||||
@ -597,7 +597,7 @@ void ChatChannel::AddInvitee(const std::string &Invitee)
|
||||
if (!IsInvitee(Invitee)) {
|
||||
Invitees.push_back(Invitee);
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Added %s as invitee to channel %s", Invitee.c_str(), Name.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Added %s as invitee to channel %s", Invitee.c_str(), Name.c_str());
|
||||
}
|
||||
|
||||
}
|
||||
@ -608,7 +608,7 @@ void ChatChannel::RemoveInvitee(std::string Invitee)
|
||||
|
||||
if(it != std::end(Invitees)) {
|
||||
Invitees.erase(it);
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Removed %s as invitee to channel %s", Invitee.c_str(), Name.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Removed %s as invitee to channel %s", Invitee.c_str(), Name.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@ -622,7 +622,7 @@ void ChatChannel::AddModerator(const std::string &Moderator)
|
||||
if (!IsModerator(Moderator)) {
|
||||
Moderators.push_back(Moderator);
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Added %s as moderator to channel %s", Moderator.c_str(), Name.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Added %s as moderator to channel %s", Moderator.c_str(), Name.c_str());
|
||||
}
|
||||
|
||||
}
|
||||
@ -633,7 +633,7 @@ void ChatChannel::RemoveModerator(const std::string &Moderator)
|
||||
|
||||
if (it != std::end(Moderators)) {
|
||||
Moderators.erase(it);
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Removed %s as moderator to channel %s", Moderator.c_str(), Name.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Removed %s as moderator to channel %s", Moderator.c_str(), Name.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@ -647,7 +647,7 @@ void ChatChannel::AddVoice(const std::string &inVoiced)
|
||||
if (!HasVoice(inVoiced)) {
|
||||
Voiced.push_back(inVoiced);
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Added %s as voiced to channel %s", inVoiced.c_str(), Name.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Added %s as voiced to channel %s", inVoiced.c_str(), Name.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@ -658,7 +658,7 @@ void ChatChannel::RemoveVoice(const std::string &inVoiced)
|
||||
if (it != std::end(Voiced)) {
|
||||
Voiced.erase(it);
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Removed %s as voiced to channel %s", inVoiced.c_str(), Name.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Removed %s as voiced to channel %s", inVoiced.c_str(), Name.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -235,7 +235,7 @@ std::vector<std::string> ParseRecipients(std::string RecipientString) {
|
||||
|
||||
static void ProcessMailTo(Client *c, std::string MailMessage) {
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "MAILTO: From %s, %s", c->MailBoxName().c_str(), MailMessage.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "MAILTO: From %s, %s", c->MailBoxName().c_str(), MailMessage.c_str());
|
||||
|
||||
std::vector<std::string> Recipients;
|
||||
|
||||
@ -304,7 +304,7 @@ static void ProcessMailTo(Client *c, std::string MailMessage) {
|
||||
|
||||
if (!database.SendMail(Recipient, c->MailBoxName(), Subject, Body, RecipientsString)) {
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Failed in SendMail(%s, %s, %s, %s)", Recipient.c_str(),
|
||||
Log(Logs::Detail, Logs::UCSServer, "Failed in SendMail(%s, %s, %s, %s)", Recipient.c_str(),
|
||||
c->MailBoxName().c_str(), Subject.c_str(), RecipientsString.c_str());
|
||||
|
||||
int PacketLength = 10 + Recipient.length() + Subject.length();
|
||||
@ -397,7 +397,7 @@ static void ProcessSetMessageStatus(std::string SetMessageCommand) {
|
||||
|
||||
static void ProcessCommandBuddy(Client *c, std::string Buddy) {
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Received buddy command with parameters %s", Buddy.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Received buddy command with parameters %s", Buddy.c_str());
|
||||
c->GeneralChannelMessage("Buddy list modified");
|
||||
|
||||
uint8 SubAction = 1;
|
||||
@ -426,7 +426,7 @@ static void ProcessCommandBuddy(Client *c, std::string Buddy) {
|
||||
|
||||
static void ProcessCommandIgnore(Client *c, std::string Ignoree) {
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Received ignore command with parameters %s", Ignoree.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Received ignore command with parameters %s", Ignoree.c_str());
|
||||
c->GeneralChannelMessage("Ignore list modified");
|
||||
|
||||
uint8 SubAction = 0;
|
||||
@ -482,12 +482,12 @@ Clientlist::Clientlist(int ChatPort) {
|
||||
|
||||
const ucsconfig *Config = ucsconfig::get();
|
||||
|
||||
Log(Logs::General, Logs::UCS_Server, "Loading '%s'", Config->MailOpCodesFile.c_str());
|
||||
Log(Logs::General, Logs::UCSServer, "Loading '%s'", Config->MailOpCodesFile.c_str());
|
||||
if (!ChatOpMgr->LoadOpcodes(Config->MailOpCodesFile.c_str()))
|
||||
exit(1);
|
||||
|
||||
chatsf->OnNewConnection([this](std::shared_ptr<EQ::Net::EQStream> stream) {
|
||||
LogF(Logs::General, Logs::Login_Server, "New Client UDP connection from {0}:{1}", stream->GetRemoteIP(), stream->GetRemotePort());
|
||||
LogF(Logs::General, Logs::Loginserver, "New Client UDP connection from {0}:{1}", stream->GetRemoteIP(), stream->GetRemotePort());
|
||||
stream->SetOpcodeManager(&ChatOpMgr);
|
||||
|
||||
auto c = new Client(stream);
|
||||
@ -567,13 +567,13 @@ void Clientlist::CheckForStaleConnections(Client *c) {
|
||||
if (((*Iterator) != c) && ((c->GetName() == (*Iterator)->GetName())
|
||||
&& (c->GetConnectionType() == (*Iterator)->GetConnectionType()))) {
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Removing old connection for %s", c->GetName().c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Removing old connection for %s", c->GetName().c_str());
|
||||
|
||||
struct in_addr in;
|
||||
|
||||
in.s_addr = (*Iterator)->ClientStream->GetRemoteIP();
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Client connection from %s:%d closed.", inet_ntoa(in),
|
||||
Log(Logs::Detail, Logs::UCSServer, "Client connection from %s:%d closed.", inet_ntoa(in),
|
||||
ntohs((*Iterator)->ClientStream->GetRemotePort()));
|
||||
|
||||
safe_delete((*Iterator));
|
||||
@ -592,7 +592,7 @@ void Clientlist::Process()
|
||||
struct in_addr in;
|
||||
in.s_addr = (*it)->ClientStream->GetRemoteIP();
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Client connection from %s:%d closed.", inet_ntoa(in),
|
||||
Log(Logs::Detail, Logs::UCSServer, "Client connection from %s:%d closed.", inet_ntoa(in),
|
||||
ntohs((*it)->ClientStream->GetRemotePort()));
|
||||
|
||||
safe_delete((*it));
|
||||
@ -618,7 +618,7 @@ void Clientlist::Process()
|
||||
VARSTRUCT_DECODE_STRING(MailBox, PacketBuffer);
|
||||
|
||||
if (strlen(PacketBuffer) != 9) {
|
||||
Log(Logs::Detail, Logs::UCS_Server,
|
||||
Log(Logs::Detail, Logs::UCSServer,
|
||||
"Mail key is the wrong size. Version of world incompatible with UCS.");
|
||||
KeyValid = false;
|
||||
break;
|
||||
@ -640,11 +640,11 @@ void Clientlist::Process()
|
||||
else
|
||||
CharacterName = MailBoxString.substr(LastPeriod + 1);
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Received login for user %s with key %s",
|
||||
Log(Logs::Detail, Logs::UCSServer, "Received login for user %s with key %s",
|
||||
MailBox, Key);
|
||||
|
||||
if (!database.VerifyMailKey(CharacterName, (*it)->ClientStream->GetRemoteIP(), Key)) {
|
||||
Log(Logs::Detail, Logs::UCS_Server,
|
||||
Log(Logs::Detail, Logs::UCSServer,
|
||||
"Chat Key for %s does not match, closing connection.", MailBox);
|
||||
KeyValid = false;
|
||||
break;
|
||||
@ -670,7 +670,7 @@ void Clientlist::Process()
|
||||
}
|
||||
|
||||
default: {
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Unhandled chat opcode %8X", opcode);
|
||||
Log(Logs::Detail, Logs::UCSServer, "Unhandled chat opcode %8X", opcode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -680,7 +680,7 @@ void Clientlist::Process()
|
||||
struct in_addr in;
|
||||
in.s_addr = (*it)->ClientStream->GetRemoteIP();
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server,
|
||||
Log(Logs::Detail, Logs::UCSServer,
|
||||
"Force disconnecting client: %s:%d, KeyValid=%i, GetForceDisconnect()=%i",
|
||||
inet_ntoa(in), ntohs((*it)->ClientStream->GetRemotePort()), KeyValid,
|
||||
(*it)->GetForceDisconnect());
|
||||
@ -823,7 +823,7 @@ void Clientlist::ProcessOPMailCommand(Client *c, std::string CommandString)
|
||||
break;
|
||||
|
||||
case CommandSetMessageStatus:
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Set Message Status, Params: %s", Parameters.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Set Message Status, Params: %s", Parameters.c_str());
|
||||
ProcessSetMessageStatus(Parameters);
|
||||
break;
|
||||
|
||||
@ -848,7 +848,7 @@ void Clientlist::ProcessOPMailCommand(Client *c, std::string CommandString)
|
||||
|
||||
default:
|
||||
c->SendHelp();
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Unhandled OP_Mail command: %s", CommandString.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Unhandled OP_Mail command: %s", CommandString.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@ -859,7 +859,7 @@ void Clientlist::CloseAllConnections() {
|
||||
|
||||
for (Iterator = ClientChatConnections.begin(); Iterator != ClientChatConnections.end(); ++Iterator) {
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Removing client %s", (*Iterator)->GetName().c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Removing client %s", (*Iterator)->GetName().c_str());
|
||||
|
||||
(*Iterator)->CloseConnection();
|
||||
}
|
||||
@ -868,7 +868,7 @@ void Clientlist::CloseAllConnections() {
|
||||
void Client::AddCharacter(int CharID, const char *CharacterName, int Level) {
|
||||
|
||||
if (!CharacterName) return;
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Adding character %s with ID %i for %s", CharacterName, CharID, GetName().c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Adding character %s with ID %i for %s", CharacterName, CharID, GetName().c_str());
|
||||
CharacterEntry NewCharacter;
|
||||
NewCharacter.CharID = CharID;
|
||||
NewCharacter.Name = CharacterName;
|
||||
@ -933,7 +933,7 @@ void Client::AddToChannelList(ChatChannel *JoinedChannel) {
|
||||
for (int i = 0; i < MAX_JOINED_CHANNELS; i++)
|
||||
if (JoinedChannels[i] == nullptr) {
|
||||
JoinedChannels[i] = JoinedChannel;
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Added Channel %s to slot %i for %s", JoinedChannel->GetName().c_str(), i + 1, GetName().c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Added Channel %s to slot %i for %s", JoinedChannel->GetName().c_str(), i + 1, GetName().c_str());
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -974,7 +974,7 @@ void Client::JoinChannels(std::string ChannelNameList) {
|
||||
}
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Client: %s joining channels %s", GetName().c_str(), ChannelNameList.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Client: %s joining channels %s", GetName().c_str(), ChannelNameList.c_str());
|
||||
|
||||
int NumberOfChannels = ChannelCount();
|
||||
|
||||
@ -1073,7 +1073,7 @@ void Client::JoinChannels(std::string ChannelNameList) {
|
||||
|
||||
void Client::LeaveChannels(std::string ChannelNameList) {
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Client: %s leaving channels %s", GetName().c_str(), ChannelNameList.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Client: %s leaving channels %s", GetName().c_str(), ChannelNameList.c_str());
|
||||
|
||||
std::string::size_type CurrentPos = 0;
|
||||
|
||||
@ -1249,7 +1249,7 @@ void Client::SendChannelMessage(std::string Message)
|
||||
|
||||
std::string ChannelName = Message.substr(1, MessageStart - 1);
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "%s tells %s, [%s]", GetName().c_str(), ChannelName.c_str(), Message.substr(MessageStart + 1).c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "%s tells %s, [%s]", GetName().c_str(), ChannelName.c_str(), Message.substr(MessageStart + 1).c_str());
|
||||
|
||||
ChatChannel *RequiredChannel = ChannelList->FindChannel(ChannelName);
|
||||
|
||||
@ -1392,7 +1392,7 @@ void Client::SendChannelMessageByNumber(std::string Message) {
|
||||
}
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "%s tells %s, [%s]", GetName().c_str(), RequiredChannel->GetName().c_str(),
|
||||
Log(Logs::Detail, Logs::UCSServer, "%s tells %s, [%s]", GetName().c_str(), RequiredChannel->GetName().c_str(),
|
||||
Message.substr(MessageStart + 1).c_str());
|
||||
|
||||
if (RuleB(Chat, EnableAntiSpam))
|
||||
@ -1600,7 +1600,7 @@ void Client::SetChannelPassword(std::string ChannelPassword) {
|
||||
else
|
||||
Message = "Password change on channel " + ChannelName;
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Set password of channel [%s] to [%s] by %s", ChannelName.c_str(), Password.c_str(), GetName().c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Set password of channel [%s] to [%s] by %s", ChannelName.c_str(), Password.c_str(), GetName().c_str());
|
||||
|
||||
ChatChannel *RequiredChannel = ChannelList->FindChannel(ChannelName);
|
||||
|
||||
@ -1655,7 +1655,7 @@ void Client::SetChannelOwner(std::string CommandString) {
|
||||
if ((ChannelName.length() > 0) && isdigit(ChannelName[0]))
|
||||
ChannelName = ChannelSlotName(atoi(ChannelName.c_str()));
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Set owner of channel [%s] to [%s]", ChannelName.c_str(), NewOwner.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Set owner of channel [%s] to [%s]", ChannelName.c_str(), NewOwner.c_str());
|
||||
|
||||
ChatChannel *RequiredChannel = ChannelList->FindChannel(ChannelName);
|
||||
|
||||
@ -1743,7 +1743,7 @@ void Client::ChannelInvite(std::string CommandString) {
|
||||
if ((ChannelName.length() > 0) && isdigit(ChannelName[0]))
|
||||
ChannelName = ChannelSlotName(atoi(ChannelName.c_str()));
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "[%s] invites [%s] to channel [%s]", GetName().c_str(), Invitee.c_str(), ChannelName.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "[%s] invites [%s] to channel [%s]", GetName().c_str(), Invitee.c_str(), ChannelName.c_str());
|
||||
|
||||
Client *RequiredClient = g_Clientlist->FindCharacter(Invitee);
|
||||
|
||||
@ -1871,7 +1871,7 @@ void Client::ChannelGrantModerator(std::string CommandString) {
|
||||
if ((ChannelName.length() > 0) && isdigit(ChannelName[0]))
|
||||
ChannelName = ChannelSlotName(atoi(ChannelName.c_str()));
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "[%s] gives [%s] moderator rights to channel [%s]", GetName().c_str(), Moderator.c_str(), ChannelName.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "[%s] gives [%s] moderator rights to channel [%s]", GetName().c_str(), Moderator.c_str(), ChannelName.c_str());
|
||||
|
||||
Client *RequiredClient = g_Clientlist->FindCharacter(Moderator);
|
||||
|
||||
@ -1952,7 +1952,7 @@ void Client::ChannelGrantVoice(std::string CommandString) {
|
||||
if ((ChannelName.length() > 0) && isdigit(ChannelName[0]))
|
||||
ChannelName = ChannelSlotName(atoi(ChannelName.c_str()));
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "[%s] gives [%s] voice to channel [%s]", GetName().c_str(), Voicee.c_str(), ChannelName.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "[%s] gives [%s] voice to channel [%s]", GetName().c_str(), Voicee.c_str(), ChannelName.c_str());
|
||||
|
||||
Client *RequiredClient = g_Clientlist->FindCharacter(Voicee);
|
||||
|
||||
@ -2040,7 +2040,7 @@ void Client::ChannelKick(std::string CommandString) {
|
||||
if ((ChannelName.length() > 0) && isdigit(ChannelName[0]))
|
||||
ChannelName = ChannelSlotName(atoi(ChannelName.c_str()));
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "[%s] kicks [%s] from channel [%s]", GetName().c_str(), Kickee.c_str(), ChannelName.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "[%s] kicks [%s] from channel [%s]", GetName().c_str(), Kickee.c_str(), ChannelName.c_str());
|
||||
|
||||
Client *RequiredClient = g_Clientlist->FindCharacter(Kickee);
|
||||
|
||||
@ -2150,28 +2150,28 @@ void Client::SetConnectionType(char c) {
|
||||
{
|
||||
TypeOfConnection = ConnectionTypeChat;
|
||||
ClientVersion_ = EQEmu::versions::ClientVersion::Titanium;
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Connection type is Chat (Titanium)");
|
||||
Log(Logs::Detail, Logs::UCSServer, "Connection type is Chat (Titanium)");
|
||||
break;
|
||||
}
|
||||
case EQEmu::versions::ucsTitaniumMail:
|
||||
{
|
||||
TypeOfConnection = ConnectionTypeMail;
|
||||
ClientVersion_ = EQEmu::versions::ClientVersion::Titanium;
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Connection type is Mail (Titanium)");
|
||||
Log(Logs::Detail, Logs::UCSServer, "Connection type is Mail (Titanium)");
|
||||
break;
|
||||
}
|
||||
case EQEmu::versions::ucsSoFCombined:
|
||||
{
|
||||
TypeOfConnection = ConnectionTypeCombined;
|
||||
ClientVersion_ = EQEmu::versions::ClientVersion::SoF;
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Connection type is Combined (SoF)");
|
||||
Log(Logs::Detail, Logs::UCSServer, "Connection type is Combined (SoF)");
|
||||
break;
|
||||
}
|
||||
case EQEmu::versions::ucsSoDCombined:
|
||||
{
|
||||
TypeOfConnection = ConnectionTypeCombined;
|
||||
ClientVersion_ = EQEmu::versions::ClientVersion::SoD;
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Connection type is Combined (SoD)");
|
||||
Log(Logs::Detail, Logs::UCSServer, "Connection type is Combined (SoD)");
|
||||
break;
|
||||
}
|
||||
case EQEmu::versions::ucsUFCombined:
|
||||
@ -2179,7 +2179,7 @@ void Client::SetConnectionType(char c) {
|
||||
TypeOfConnection = ConnectionTypeCombined;
|
||||
ClientVersion_ = EQEmu::versions::ClientVersion::UF;
|
||||
UnderfootOrLater = true;
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Connection type is Combined (Underfoot)");
|
||||
Log(Logs::Detail, Logs::UCSServer, "Connection type is Combined (Underfoot)");
|
||||
break;
|
||||
}
|
||||
case EQEmu::versions::ucsRoFCombined:
|
||||
@ -2187,7 +2187,7 @@ void Client::SetConnectionType(char c) {
|
||||
TypeOfConnection = ConnectionTypeCombined;
|
||||
ClientVersion_ = EQEmu::versions::ClientVersion::RoF;
|
||||
UnderfootOrLater = true;
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Connection type is Combined (RoF)");
|
||||
Log(Logs::Detail, Logs::UCSServer, "Connection type is Combined (RoF)");
|
||||
break;
|
||||
}
|
||||
case EQEmu::versions::ucsRoF2Combined:
|
||||
@ -2195,14 +2195,14 @@ void Client::SetConnectionType(char c) {
|
||||
TypeOfConnection = ConnectionTypeCombined;
|
||||
ClientVersion_ = EQEmu::versions::ClientVersion::RoF2;
|
||||
UnderfootOrLater = true;
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Connection type is Combined (RoF2)");
|
||||
Log(Logs::Detail, Logs::UCSServer, "Connection type is Combined (RoF2)");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
TypeOfConnection = ConnectionTypeUnknown;
|
||||
ClientVersion_ = EQEmu::versions::ClientVersion::Unknown;
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Connection type is unknown.");
|
||||
Log(Logs::Detail, Logs::UCSServer, "Connection type is unknown.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2279,12 +2279,12 @@ void Client::SendNotification(int MailBoxNumber, std::string Subject, std::strin
|
||||
|
||||
void Client::ChangeMailBox(int NewMailBox)
|
||||
{
|
||||
Log(Logs::Detail, Logs::UCS_Server, "%s Change to mailbox %i", MailBoxName().c_str(), NewMailBox);
|
||||
Log(Logs::Detail, Logs::UCSServer, "%s Change to mailbox %i", MailBoxName().c_str(), NewMailBox);
|
||||
|
||||
SetMailBox(NewMailBox);
|
||||
auto id = std::to_string(NewMailBox);
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "New mailbox is %s", MailBoxName().c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "New mailbox is %s", MailBoxName().c_str());
|
||||
|
||||
auto outapp = new EQApplicationPacket(OP_MailboxChange, id.length() + 1);
|
||||
|
||||
@ -2353,13 +2353,13 @@ std::string Client::MailBoxName() {
|
||||
|
||||
if ((Characters.empty()) || (CurrentMailBox > (Characters.size() - 1)))
|
||||
{
|
||||
Log(Logs::Detail, Logs::UCS_Server, "MailBoxName() called with CurrentMailBox set to %i and Characters.size() is %i",
|
||||
Log(Logs::Detail, Logs::UCSServer, "MailBoxName() called with CurrentMailBox set to %i and Characters.size() is %i",
|
||||
CurrentMailBox, Characters.size());
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "MailBoxName() called with CurrentMailBox set to %i and Characters.size() is %i",
|
||||
Log(Logs::Detail, Logs::UCSServer, "MailBoxName() called with CurrentMailBox set to %i and Characters.size() is %i",
|
||||
CurrentMailBox, Characters.size());
|
||||
|
||||
return Characters[CurrentMailBox].Name;
|
||||
|
||||
@ -110,15 +110,15 @@ void Database::GetAccountStatus(Client *client) {
|
||||
client->GetAccountID());
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Unable to get account status for character %s, error %s", client->GetName().c_str(), results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Unable to get account status for character %s, error %s", client->GetName().c_str(), results.ErrorMessage().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "GetAccountStatus Query: %s", query.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "GetAccountStatus Query: %s", query.c_str());
|
||||
|
||||
if(results.RowCount() != 1)
|
||||
{
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Error in GetAccountStatus");
|
||||
Log(Logs::Detail, Logs::UCSServer, "Error in GetAccountStatus");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -129,13 +129,13 @@ void Database::GetAccountStatus(Client *client) {
|
||||
client->SetKarma(atoi(row[2]));
|
||||
client->SetRevoked((atoi(row[3])==1?true:false));
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Set account status to %i, hideme to %i and karma to %i for %s", client->GetAccountStatus(), client->GetHideMe(), client->GetKarma(), client->GetName().c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Set account status to %i, hideme to %i and karma to %i for %s", client->GetAccountStatus(), client->GetHideMe(), client->GetKarma(), client->GetName().c_str());
|
||||
|
||||
}
|
||||
|
||||
int Database::FindAccount(const char *characterName, Client *client) {
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "FindAccount for character %s", characterName);
|
||||
Log(Logs::Detail, Logs::UCSServer, "FindAccount for character %s", characterName);
|
||||
|
||||
|
||||
client->ClearCharacters();
|
||||
@ -144,12 +144,12 @@ int Database::FindAccount(const char *characterName, Client *client) {
|
||||
characterName);
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log(Logs::Detail, Logs::UCS_Server, "FindAccount query failed: %s", query.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "FindAccount query failed: %s", query.c_str());
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (results.RowCount() != 1) {
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Bad result from query");
|
||||
Log(Logs::Detail, Logs::UCSServer, "Bad result from query");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ int Database::FindAccount(const char *characterName, Client *client) {
|
||||
|
||||
int accountID = atoi(row[1]);
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Account ID for %s is %i", characterName, accountID);
|
||||
Log(Logs::Detail, Logs::UCSServer, "Account ID for %s is %i", characterName, accountID);
|
||||
|
||||
query = StringFormat("SELECT `id`, `name`, `level` FROM `character_data` "
|
||||
"WHERE `account_id` = %i AND `name` != '%s'",
|
||||
@ -179,7 +179,7 @@ bool Database::VerifyMailKey(std::string characterName, int IPAddress, std::stri
|
||||
characterName.c_str());
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Error retrieving mailkey from database: %s", results.ErrorMessage().c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Error retrieving mailkey from database: %s", results.ErrorMessage().c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -195,7 +195,7 @@ bool Database::VerifyMailKey(std::string characterName, int IPAddress, std::stri
|
||||
else
|
||||
sprintf(combinedKey, "%s", MailKey.c_str());
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "DB key is [%s], Client key is [%s]", (row[0] ? row[0] : ""), combinedKey);
|
||||
Log(Logs::Detail, Logs::UCSServer, "DB key is [%s], Client key is [%s]", (row[0] ? row[0] : ""), combinedKey);
|
||||
|
||||
return !strcmp(row[0], combinedKey);
|
||||
}
|
||||
@ -213,7 +213,7 @@ int Database::FindCharacter(const char *characterName)
|
||||
safe_delete_array(safeCharName);
|
||||
|
||||
if (results.RowCount() != 1) {
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Bad result from FindCharacter query for character %s",
|
||||
Log(Logs::Detail, Logs::UCSServer, "Bad result from FindCharacter query for character %s",
|
||||
characterName);
|
||||
return -1;
|
||||
}
|
||||
@ -245,7 +245,7 @@ bool Database::GetVariable(const char* varname, char* varvalue, uint16 varvalue_
|
||||
|
||||
bool Database::LoadChatChannels() {
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Loading chat channels from the database.");
|
||||
Log(Logs::Detail, Logs::UCSServer, "Loading chat channels from the database.");
|
||||
|
||||
const std::string query = "SELECT `name`, `owner`, `password`, `minstatus` FROM `chatchannels`";
|
||||
auto results = QueryDatabase(query);
|
||||
@ -266,7 +266,7 @@ bool Database::LoadChatChannels() {
|
||||
|
||||
void Database::SetChannelPassword(std::string channelName, std::string password) {
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Database::SetChannelPassword(%s, %s)", channelName.c_str(), password.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Database::SetChannelPassword(%s, %s)", channelName.c_str(), password.c_str());
|
||||
|
||||
std::string query = StringFormat("UPDATE `chatchannels` SET `password` = '%s' WHERE `name` = '%s'",
|
||||
password.c_str(), channelName.c_str());
|
||||
@ -275,7 +275,7 @@ void Database::SetChannelPassword(std::string channelName, std::string password)
|
||||
|
||||
void Database::SetChannelOwner(std::string channelName, std::string owner) {
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Database::SetChannelOwner(%s, %s)", channelName.c_str(), owner.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Database::SetChannelOwner(%s, %s)", channelName.c_str(), owner.c_str());
|
||||
|
||||
std::string query = StringFormat("UPDATE `chatchannels` SET `owner` = '%s' WHERE `name` = '%s'",
|
||||
owner.c_str(), channelName.c_str());
|
||||
@ -288,7 +288,7 @@ void Database::SendHeaders(Client *client) {
|
||||
int unknownField3 = 1;
|
||||
int characterID = FindCharacter(client->MailBoxName().c_str());
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Sendheaders for %s, CharID is %i", client->MailBoxName().c_str(), characterID);
|
||||
Log(Logs::Detail, Logs::UCSServer, "Sendheaders for %s, CharID is %i", client->MailBoxName().c_str(), characterID);
|
||||
|
||||
if(characterID <= 0)
|
||||
return;
|
||||
@ -373,7 +373,7 @@ void Database::SendBody(Client *client, int messageNumber) {
|
||||
|
||||
int characterID = FindCharacter(client->MailBoxName().c_str());
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "SendBody: MsgID %i, to %s, CharID is %i", messageNumber, client->MailBoxName().c_str(), characterID);
|
||||
Log(Logs::Detail, Logs::UCSServer, "SendBody: MsgID %i, to %s, CharID is %i", messageNumber, client->MailBoxName().c_str(), characterID);
|
||||
|
||||
if(characterID <= 0)
|
||||
return;
|
||||
@ -390,7 +390,7 @@ void Database::SendBody(Client *client, int messageNumber) {
|
||||
|
||||
auto row = results.begin();
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Message: %i body (%i bytes)", messageNumber, strlen(row[1]));
|
||||
Log(Logs::Detail, Logs::UCSServer, "Message: %i body (%i bytes)", messageNumber, strlen(row[1]));
|
||||
|
||||
int packetLength = 12 + strlen(row[0]) + strlen(row[1]) + strlen(row[2]);
|
||||
|
||||
@ -435,7 +435,7 @@ bool Database::SendMail(std::string recipient, std::string from, std::string sub
|
||||
|
||||
characterID = FindCharacter(characterName.c_str());
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "SendMail: CharacterID for recipient %s is %i", characterName.c_str(), characterID);
|
||||
Log(Logs::Detail, Logs::UCSServer, "SendMail: CharacterID for recipient %s is %i", characterName.c_str(), characterID);
|
||||
|
||||
if(characterID <= 0)
|
||||
return false;
|
||||
@ -460,7 +460,7 @@ bool Database::SendMail(std::string recipient, std::string from, std::string sub
|
||||
return false;
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "MessageID %i generated, from %s, to %s", results.LastInsertedID(), from.c_str(), recipient.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "MessageID %i generated, from %s, to %s", results.LastInsertedID(), from.c_str(), recipient.c_str());
|
||||
|
||||
|
||||
Client *client = g_Clientlist->IsCharacterOnline(characterName);
|
||||
@ -477,7 +477,7 @@ bool Database::SendMail(std::string recipient, std::string from, std::string sub
|
||||
|
||||
void Database::SetMessageStatus(int messageNumber, int status) {
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "SetMessageStatus %i %i", messageNumber, status);
|
||||
Log(Logs::Detail, Logs::UCSServer, "SetMessageStatus %i %i", messageNumber, status);
|
||||
|
||||
if(status == 0) {
|
||||
std::string query = StringFormat("DELETE FROM `mail` WHERE `msgid` = %i", messageNumber);
|
||||
@ -491,7 +491,7 @@ void Database::SetMessageStatus(int messageNumber, int status) {
|
||||
|
||||
void Database::ExpireMail() {
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Expiring mail...");
|
||||
Log(Logs::Detail, Logs::UCSServer, "Expiring mail...");
|
||||
|
||||
std::string query = "SELECT COUNT(*) FROM `mail`";
|
||||
auto results = QueryDatabase(query);
|
||||
@ -501,7 +501,7 @@ void Database::ExpireMail() {
|
||||
|
||||
auto row = results.begin();
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "There are %s messages in the database.", row[0]);
|
||||
Log(Logs::Detail, Logs::UCSServer, "There are %s messages in the database.", row[0]);
|
||||
|
||||
// Expire Trash
|
||||
if(RuleI(Mail, ExpireTrash) >= 0) {
|
||||
@ -509,7 +509,7 @@ void Database::ExpireMail() {
|
||||
time(nullptr) - RuleI(Mail, ExpireTrash));
|
||||
results = QueryDatabase(query);
|
||||
if(results.Success())
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Expired %i trash messages.", results.RowsAffected());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Expired %i trash messages.", results.RowsAffected());
|
||||
}
|
||||
|
||||
// Expire Read
|
||||
@ -518,7 +518,7 @@ void Database::ExpireMail() {
|
||||
time(nullptr) - RuleI(Mail, ExpireRead));
|
||||
results = QueryDatabase(query);
|
||||
if(results.Success())
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Expired %i read messages.", results.RowsAffected());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Expired %i read messages.", results.RowsAffected());
|
||||
}
|
||||
|
||||
// Expire Unread
|
||||
@ -527,7 +527,7 @@ void Database::ExpireMail() {
|
||||
time(nullptr) - RuleI(Mail, ExpireUnread));
|
||||
results = QueryDatabase(query);
|
||||
if(results.Success())
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Expired %i unread messages.", results.RowsAffected());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Expired %i unread messages.", results.RowsAffected());
|
||||
}
|
||||
}
|
||||
|
||||
@ -538,7 +538,7 @@ void Database::AddFriendOrIgnore(int charID, int type, std::string name) {
|
||||
charID, type, CapitaliseName(name).c_str());
|
||||
auto results = QueryDatabase(query);
|
||||
if(results.Success())
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Wrote Friend/Ignore entry for charid %i, type %i, name %s to database.", charID, type, name.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Wrote Friend/Ignore entry for charid %i, type %i, name %s to database.", charID, type, name.c_str());
|
||||
|
||||
}
|
||||
|
||||
@ -549,10 +549,10 @@ void Database::RemoveFriendOrIgnore(int charID, int type, std::string name) {
|
||||
charID, type, CapitaliseName(name).c_str());
|
||||
auto results = QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Error removing friend/ignore, query was %s", query.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Error removing friend/ignore, query was %s", query.c_str());
|
||||
}
|
||||
else {
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Removed Friend/Ignore entry for charid %i, type %i, name %s from database.", charID, type, name.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Removed Friend/Ignore entry for charid %i, type %i, name %s from database.", charID, type, name.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@ -571,12 +571,12 @@ void Database::GetFriendsAndIgnore(int charID, std::vector<std::string> &friends
|
||||
if(atoi(row[0]) == 0)
|
||||
{
|
||||
ignorees.push_back(name);
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Added Ignoree from DB %s", name.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Added Ignoree from DB %s", name.c_str());
|
||||
continue;
|
||||
}
|
||||
|
||||
friends.push_back(name);
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Added Friend from DB %s", name.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Added Friend from DB %s", name.c_str());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
24
ucs/ucs.cpp
24
ucs/ucs.cpp
@ -73,10 +73,10 @@ int main() {
|
||||
|
||||
Timer InterserverTimer(INTERSERVER_TIMER); // does auto-reconnect
|
||||
|
||||
Log(Logs::General, Logs::UCS_Server, "Starting EQEmu Universal Chat Server.");
|
||||
Log(Logs::General, Logs::UCSServer, "Starting EQEmu Universal Chat Server.");
|
||||
|
||||
if (!ucsconfig::LoadConfig()) {
|
||||
Log(Logs::General, Logs::UCS_Server, "Loading server configuration failed.");
|
||||
Log(Logs::General, Logs::UCSServer, "Loading server configuration failed.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -84,7 +84,7 @@ int main() {
|
||||
|
||||
WorldShortName = Config->ShortName;
|
||||
|
||||
Log(Logs::General, Logs::UCS_Server, "Connecting to MySQL...");
|
||||
Log(Logs::General, Logs::UCSServer, "Connecting to MySQL...");
|
||||
|
||||
if (!database.Connect(
|
||||
Config->DatabaseHost.c_str(),
|
||||
@ -92,7 +92,7 @@ int main() {
|
||||
Config->DatabasePassword.c_str(),
|
||||
Config->DatabaseDB.c_str(),
|
||||
Config->DatabasePort)) {
|
||||
Log(Logs::General, Logs::UCS_Server, "Cannot continue without a database connection.");
|
||||
Log(Logs::General, Logs::UCSServer, "Cannot continue without a database connection.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -104,26 +104,26 @@ int main() {
|
||||
|
||||
// ucs has no 'reload rules' handler
|
||||
if (database.GetVariable("RuleSet", tmp, sizeof(tmp)-1)) {
|
||||
Log(Logs::General, Logs::UCS_Server, "Loading rule set '%s'", tmp);
|
||||
Log(Logs::General, Logs::UCSServer, "Loading rule set '%s'", tmp);
|
||||
if(!RuleManager::Instance()->LoadRules(&database, tmp, false)) {
|
||||
Log(Logs::General, Logs::UCS_Server, "Failed to load ruleset '%s', falling back to defaults.", tmp);
|
||||
Log(Logs::General, Logs::UCSServer, "Failed to load ruleset '%s', falling back to defaults.", tmp);
|
||||
}
|
||||
} else {
|
||||
if(!RuleManager::Instance()->LoadRules(&database, "default", false)) {
|
||||
Log(Logs::General, Logs::UCS_Server, "No rule set configured, using default rules");
|
||||
Log(Logs::General, Logs::UCSServer, "No rule set configured, using default rules");
|
||||
} else {
|
||||
Log(Logs::General, Logs::UCS_Server, "Loaded default rule set 'default'", tmp);
|
||||
Log(Logs::General, Logs::UCSServer, "Loaded default rule set 'default'", tmp);
|
||||
}
|
||||
}
|
||||
|
||||
EQEmu::InitializeDynamicLookups();
|
||||
Log(Logs::General, Logs::UCS_Server, "Initialized dynamic dictionary entries");
|
||||
Log(Logs::General, Logs::UCSServer, "Initialized dynamic dictionary entries");
|
||||
|
||||
database.ExpireMail();
|
||||
|
||||
if(Config->ChatPort != Config->MailPort)
|
||||
{
|
||||
Log(Logs::General, Logs::UCS_Server, "MailPort and CharPort must be the same in eqemu_config.xml for UCS.");
|
||||
Log(Logs::General, Logs::UCSServer, "MailPort and CharPort must be the same in eqemu_config.xml for UCS.");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -134,11 +134,11 @@ int main() {
|
||||
database.LoadChatChannels();
|
||||
|
||||
if (signal(SIGINT, CatchSignal) == SIG_ERR) {
|
||||
Log(Logs::General, Logs::UCS_Server, "Could not set signal handler");
|
||||
Log(Logs::General, Logs::UCSServer, "Could not set signal handler");
|
||||
return 1;
|
||||
}
|
||||
if (signal(SIGTERM, CatchSignal) == SIG_ERR) {
|
||||
Log(Logs::General, Logs::UCS_Server, "Could not set signal handler");
|
||||
Log(Logs::General, Logs::UCSServer, "Could not set signal handler");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ void WorldServer::ProcessMessage(uint16 opcode, EQ::Net::Packet &p)
|
||||
ServerPacket tpack(opcode, p);
|
||||
ServerPacket *pack = &tpack;
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Received Opcode: %4X", opcode);
|
||||
Log(Logs::Detail, Logs::UCSServer, "Received Opcode: %4X", opcode);
|
||||
|
||||
switch (opcode)
|
||||
{
|
||||
@ -82,7 +82,7 @@ void WorldServer::ProcessMessage(uint16 opcode, EQ::Net::Packet &p)
|
||||
|
||||
std::string Message = Buffer;
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Player: %s, Sent Message: %s", From, Message.c_str());
|
||||
Log(Logs::Detail, Logs::UCSServer, "Player: %s, Sent Message: %s", From, Message.c_str());
|
||||
|
||||
Client *c = g_Clientlist->FindCharacter(From);
|
||||
|
||||
@ -93,7 +93,7 @@ void WorldServer::ProcessMessage(uint16 opcode, EQ::Net::Packet &p)
|
||||
|
||||
if (!c)
|
||||
{
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Client not found.");
|
||||
Log(Logs::Detail, Logs::UCSServer, "Client not found.");
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
162
world/client.cpp
162
world/client.cpp
@ -158,7 +158,7 @@ void Client::SendEnterWorld(std::string name)
|
||||
eqs->Close();
|
||||
return;
|
||||
} else {
|
||||
Log(Logs::Detail, Logs::World_Server,"Telling client to continue session.");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Telling client to continue session.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -204,7 +204,7 @@ void Client::SendCharInfo() {
|
||||
QueuePacket(outapp);
|
||||
}
|
||||
else {
|
||||
Log(Logs::General, Logs::World_Server, "[Error] Database did not return an OP_SendCharInfo packet for account %u", GetAccountID());
|
||||
Log(Logs::General, Logs::WorldServer, "[Error] Database did not return an OP_SendCharInfo packet for account %u", GetAccountID());
|
||||
}
|
||||
safe_delete(outapp);
|
||||
}
|
||||
@ -411,7 +411,7 @@ bool Client::HandleSendLoginInfoPacket(const EQApplicationPacket *app)
|
||||
LogDebug("Receiving Login Info Packet from Client | name [{0}] password [{1}]", name, password);
|
||||
|
||||
if (strlen(password) <= 1) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Login without a password");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Login without a password");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -443,7 +443,7 @@ bool Client::HandleSendLoginInfoPacket(const EQApplicationPacket *app)
|
||||
// Could use a Logging Out Completely message somewhere.
|
||||
cle->SetOnline(CLE_Status::CharSelect);
|
||||
|
||||
Log(Logs::General, Logs::World_Server,
|
||||
Log(Logs::General, Logs::WorldServer,
|
||||
"Account (%s) Logging(%s) to character select :: LSID: %d ",
|
||||
cle->AccountName(), inout, cle->LSID());
|
||||
}
|
||||
@ -483,7 +483,7 @@ bool Client::HandleSendLoginInfoPacket(const EQApplicationPacket *app)
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
Log(Logs::Detail, Logs::World_Server,"Bad/Expired session key '%s'",name);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Bad/Expired session key '%s'", name);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -491,7 +491,7 @@ bool Client::HandleSendLoginInfoPacket(const EQApplicationPacket *app)
|
||||
bool Client::HandleNameApprovalPacket(const EQApplicationPacket *app)
|
||||
{
|
||||
if (GetAccountID() == 0) {
|
||||
Log(Logs::Detail, Logs::World_Server,"Name approval request with no logged in account");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Name approval request with no logged in account");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -499,7 +499,7 @@ bool Client::HandleNameApprovalPacket(const EQApplicationPacket *app)
|
||||
uchar race = app->pBuffer[64];
|
||||
uchar clas = app->pBuffer[68];
|
||||
|
||||
Log(Logs::Detail, Logs::World_Server, "Name approval request. Name=%s, race=%s, class=%s", char_name, GetRaceIDName(race), GetClassIDName(clas));
|
||||
Log(Logs::Detail, Logs::WorldServer, "Name approval request. Name=%s, race=%s, class=%s", char_name, GetRaceIDName(race), GetClassIDName(clas));
|
||||
|
||||
EQApplicationPacket *outapp;
|
||||
outapp = new EQApplicationPacket;
|
||||
@ -660,11 +660,11 @@ bool Client::HandleCharacterCreateRequestPacket(const EQApplicationPacket *app)
|
||||
|
||||
bool Client::HandleCharacterCreatePacket(const EQApplicationPacket *app) {
|
||||
if (GetAccountID() == 0) {
|
||||
Log(Logs::Detail, Logs::World_Server,"Account ID not set; unable to create character.");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Account ID not set; unable to create character.");
|
||||
return false;
|
||||
}
|
||||
else if (app->size != sizeof(CharCreate_Struct)) {
|
||||
Log(Logs::Detail, Logs::World_Server,"Wrong size on OP_CharacterCreate. Got: %d, Expected: %d",app->size,sizeof(CharCreate_Struct));
|
||||
Log(Logs::Detail, Logs::WorldServer, "Wrong size on OP_CharacterCreate. Got: %d, Expected: %d", app->size, sizeof(CharCreate_Struct));
|
||||
DumpPacket(app);
|
||||
// the previous behavior was essentially returning true here
|
||||
// but that seems a bit odd to me.
|
||||
@ -691,14 +691,14 @@ bool Client::HandleCharacterCreatePacket(const EQApplicationPacket *app) {
|
||||
|
||||
bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
|
||||
if (GetAccountID() == 0) {
|
||||
Log(Logs::Detail, Logs::World_Server,"Enter world with no logged in account");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Enter world with no logged in account");
|
||||
eqs->Close();
|
||||
return true;
|
||||
}
|
||||
|
||||
if(GetAdmin() < 0)
|
||||
{
|
||||
Log(Logs::Detail, Logs::World_Server,"Account banned or suspended.");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Account banned or suspended.");
|
||||
eqs->Close();
|
||||
return true;
|
||||
}
|
||||
@ -714,14 +714,14 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
|
||||
uint32 tmpaccid = 0;
|
||||
charid = database.GetCharacterInfo(char_name, &tmpaccid, &zone_id, &instance_id);
|
||||
if (charid == 0 || tmpaccid != GetAccountID()) {
|
||||
Log(Logs::Detail, Logs::World_Server,"Could not get CharInfo for '%s'",char_name);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Could not get CharInfo for '%s'", char_name);
|
||||
eqs->Close();
|
||||
return true;
|
||||
}
|
||||
|
||||
// Make sure this account owns this character
|
||||
if (tmpaccid != GetAccountID()) {
|
||||
Log(Logs::Detail, Logs::World_Server,"This account does not own the character named '%s'",char_name);
|
||||
Log(Logs::Detail, Logs::WorldServer, "This account does not own the character named '%s'", char_name);
|
||||
eqs->Close();
|
||||
return true;
|
||||
}
|
||||
@ -763,7 +763,7 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
|
||||
zone_id = database.MoveCharacterToBind(charid, 4);
|
||||
}
|
||||
else {
|
||||
Log(Logs::Detail, Logs::World_Server, "'%s' is trying to go home before they're able...", char_name);
|
||||
Log(Logs::Detail, Logs::WorldServer, "'%s' is trying to go home before they're able...", char_name);
|
||||
database.SetHackerFlag(GetAccountName(), char_name, "MQGoHome: player tried to go home before they were able.");
|
||||
eqs->Close();
|
||||
return true;
|
||||
@ -787,7 +787,7 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
|
||||
database.MoveCharacterToZone(charid, database.GetZoneName(zone_id));
|
||||
}
|
||||
else {
|
||||
Log(Logs::Detail, Logs::World_Server, "'%s' is trying to go to tutorial but are not allowed...", char_name);
|
||||
Log(Logs::Detail, Logs::WorldServer, "'%s' is trying to go to tutorial but are not allowed...", char_name);
|
||||
database.SetHackerFlag(GetAccountName(), char_name, "MQTutorial: player tried to enter the tutorial without having tutorial enabled for this character.");
|
||||
eqs->Close();
|
||||
return true;
|
||||
@ -798,7 +798,7 @@ bool Client::HandleEnterWorldPacket(const EQApplicationPacket *app) {
|
||||
if (zone_id == 0 || !database.GetZoneName(zone_id)) {
|
||||
// This is to save people in an invalid zone, once it's removed from the DB
|
||||
database.MoveCharacterToZone(charid, "arena");
|
||||
Log(Logs::Detail, Logs::World_Server, "Zone not found in database zone_id=%i, moveing char to arena character:%s", zone_id, char_name);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Zone not found in database zone_id=%i, moveing char to arena character:%s", zone_id, char_name);
|
||||
}
|
||||
|
||||
if(instance_id > 0)
|
||||
@ -943,7 +943,7 @@ bool Client::HandleDeleteCharacterPacket(const EQApplicationPacket *app) {
|
||||
|
||||
uint32 char_acct_id = database.GetAccountIDByChar((char*)app->pBuffer);
|
||||
if(char_acct_id == GetAccountID()) {
|
||||
Log(Logs::Detail, Logs::World_Server,"Delete character: %s",app->pBuffer);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Delete character: %s", app->pBuffer);
|
||||
database.DeleteCharacter((char *)app->pBuffer);
|
||||
SendCharInfo();
|
||||
}
|
||||
@ -964,24 +964,24 @@ bool Client::HandlePacket(const EQApplicationPacket *app) {
|
||||
|
||||
EmuOpcode opcode = app->GetOpcode();
|
||||
|
||||
Log(Logs::Detail, Logs::World_Server,"Recevied EQApplicationPacket");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Recevied EQApplicationPacket");
|
||||
|
||||
if (!eqs->CheckState(ESTABLISHED)) {
|
||||
Log(Logs::Detail, Logs::World_Server,"Client disconnected (net inactive on send)");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Client disconnected (net inactive on send)");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Voidd: Anti-GM Account hack, Checks source ip against valid GM Account IP Addresses
|
||||
if (RuleB(World, GMAccountIPList) && this->GetAdmin() >= (RuleI(World, MinGMAntiHackStatus))) {
|
||||
if(!database.CheckGMIPs(long2ip(this->GetIP()).c_str(), this->GetAccountID())) {
|
||||
Log(Logs::Detail, Logs::World_Server,"GM Account not permited from source address %s and accountid %i", long2ip(this->GetIP()).c_str(), this->GetAccountID());
|
||||
Log(Logs::Detail, Logs::WorldServer, "GM Account not permited from source address %s and accountid %i", long2ip(this->GetIP()).c_str(), this->GetAccountID());
|
||||
eqs->Close();
|
||||
}
|
||||
}
|
||||
|
||||
if (GetAccountID() == 0 && opcode != OP_SendLoginInfo) {
|
||||
// Got a packet other than OP_SendLoginInfo when not logged in
|
||||
Log(Logs::Detail, Logs::World_Server,"Expecting OP_SendLoginInfo, got %s", OpcodeNames[opcode]);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Expecting OP_SendLoginInfo, got %s", OpcodeNames[opcode]);
|
||||
return false;
|
||||
}
|
||||
else if (opcode == OP_AckPacket) {
|
||||
@ -1060,7 +1060,7 @@ bool Client::HandlePacket(const EQApplicationPacket *app) {
|
||||
}
|
||||
default:
|
||||
{
|
||||
Log(Logs::Detail, Logs::World_Server,"Received unknown EQApplicationPacket");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Received unknown EQApplicationPacket");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -1078,7 +1078,7 @@ bool Client::Process() {
|
||||
to.sin_addr.s_addr = ip;
|
||||
|
||||
if (autobootup_timeout.Check()) {
|
||||
Log(Logs::General, Logs::World_Server, "Zone bootup timer expired, bootup failed or too slow.");
|
||||
Log(Logs::General, Logs::WorldServer, "Zone bootup timer expired, bootup failed or too slow.");
|
||||
TellClientZoneUnavailable();
|
||||
}
|
||||
|
||||
@ -1112,7 +1112,7 @@ bool Client::Process() {
|
||||
loginserverlist.SendPacket(pack);
|
||||
safe_delete(pack);
|
||||
}
|
||||
Log(Logs::Detail, Logs::World_Server,"Client disconnected (not active in process)");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Client disconnected (not active in process)");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1168,17 +1168,17 @@ void Client::EnterWorld(bool TryBootup) {
|
||||
}
|
||||
else {
|
||||
if (TryBootup) {
|
||||
Log(Logs::General, Logs::World_Server, "Attempting autobootup of %s (%d:%d)", zone_name, zone_id, instance_id);
|
||||
Log(Logs::General, Logs::WorldServer, "Attempting autobootup of %s (%d:%d)", zone_name, zone_id, instance_id);
|
||||
autobootup_timeout.Start();
|
||||
zone_waiting_for_bootup = zoneserver_list.TriggerBootup(zone_id, instance_id);
|
||||
if (zone_waiting_for_bootup == 0) {
|
||||
Log(Logs::General, Logs::World_Server, "No zoneserver available to boot up.");
|
||||
Log(Logs::General, Logs::WorldServer, "No zoneserver available to boot up.");
|
||||
TellClientZoneUnavailable();
|
||||
}
|
||||
return;
|
||||
}
|
||||
else {
|
||||
Log(Logs::General, Logs::World_Server, "Requested zone %s is not running.", zone_name);
|
||||
Log(Logs::General, Logs::WorldServer, "Requested zone %s is not running.", zone_name);
|
||||
TellClientZoneUnavailable();
|
||||
return;
|
||||
}
|
||||
@ -1187,7 +1187,7 @@ void Client::EnterWorld(bool TryBootup) {
|
||||
zone_waiting_for_bootup = 0;
|
||||
|
||||
if (GetAdmin() < 80 && zoneserver_list.IsZoneLocked(zone_id)) {
|
||||
Log(Logs::General, Logs::World_Server, "Enter world failed. Zone is locked.");
|
||||
Log(Logs::General, Logs::WorldServer, "Enter world failed. Zone is locked.");
|
||||
TellClientZoneUnavailable();
|
||||
return;
|
||||
}
|
||||
@ -1200,7 +1200,7 @@ void Client::EnterWorld(bool TryBootup) {
|
||||
cle->SetChar(charid, char_name);
|
||||
database.UpdateLiveChar(char_name, GetAccountID());
|
||||
|
||||
Log(Logs::General, Logs::World_Server,
|
||||
Log(Logs::General, Logs::WorldServer,
|
||||
"(%s) %s %s (Zone ID %d: Instance ID: %d) ",
|
||||
char_name,
|
||||
(seen_character_select ? "Zoning from character select" : "Zoning to"),
|
||||
@ -1243,9 +1243,9 @@ void Client::Clearance(int8 response)
|
||||
{
|
||||
if (zs == 0)
|
||||
{
|
||||
Log(Logs::Detail, Logs::World_Server,"Unable to find zoneserver in Client::Clearance!!");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Unable to find zoneserver in Client::Clearance!!");
|
||||
} else {
|
||||
Log(Logs::Detail, Logs::World_Server, "Invalid response %d in Client::Clearance", response);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Invalid response %d in Client::Clearance", response);
|
||||
}
|
||||
|
||||
TellClientZoneUnavailable();
|
||||
@ -1255,20 +1255,20 @@ void Client::Clearance(int8 response)
|
||||
EQApplicationPacket* outapp;
|
||||
|
||||
if (zs->GetCAddress() == nullptr) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Unable to do zs->GetCAddress() in Client::Clearance!!");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Unable to do zs->GetCAddress() in Client::Clearance!!");
|
||||
TellClientZoneUnavailable();
|
||||
return;
|
||||
}
|
||||
|
||||
if (zone_id == 0) {
|
||||
Log(Logs::Detail, Logs::World_Server, "zoneID is nullptr in Client::Clearance!!");
|
||||
Log(Logs::Detail, Logs::WorldServer, "zoneID is nullptr in Client::Clearance!!");
|
||||
TellClientZoneUnavailable();
|
||||
return;
|
||||
}
|
||||
|
||||
const char* zonename = database.GetZoneName(zone_id);
|
||||
if (zonename == 0) {
|
||||
Log(Logs::Detail, Logs::World_Server, "zonename is nullptr in Client::Clearance!!");
|
||||
Log(Logs::Detail, Logs::WorldServer, "zonename is nullptr in Client::Clearance!!");
|
||||
TellClientZoneUnavailable();
|
||||
return;
|
||||
}
|
||||
@ -1292,10 +1292,10 @@ void Client::Clearance(int8 response)
|
||||
|
||||
if(strcmp(zs_addr, "127.0.0.1") == 0)
|
||||
{
|
||||
Log(Logs::Detail, Logs::World_Server, "Local zone address was %s, setting local address to: %s", zs_addr, WorldConfig::get()->LocalAddress.c_str());
|
||||
Log(Logs::Detail, Logs::WorldServer, "Local zone address was %s, setting local address to: %s", zs_addr, WorldConfig::get()->LocalAddress.c_str());
|
||||
zs_addr = WorldConfig::get()->LocalAddress.c_str();
|
||||
} else {
|
||||
Log(Logs::Detail, Logs::World_Server, "Local zone address %s", zs_addr);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Local zone address %s", zs_addr);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1310,7 +1310,7 @@ void Client::Clearance(int8 response)
|
||||
|
||||
strcpy(zsi->ip, zs_addr);
|
||||
zsi->port =zs->GetCPort();
|
||||
Log(Logs::Detail, Logs::World_Server,"Sending client to zone %s (%d:%d) at %s:%d",zonename,zone_id,instance_id,zsi->ip,zsi->port);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Sending client to zone %s (%d:%d) at %s:%d", zonename, zone_id, instance_id, zsi->ip, zsi->port);
|
||||
QueuePacket(outapp);
|
||||
safe_delete(outapp);
|
||||
|
||||
@ -1342,7 +1342,7 @@ bool Client::GenPassKey(char* key) {
|
||||
}
|
||||
|
||||
void Client::QueuePacket(const EQApplicationPacket* app, bool ack_req) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Sending EQApplicationPacket OpCode 0x%04x",app->GetOpcode());
|
||||
Log(Logs::Detail, Logs::WorldServer, "Sending EQApplicationPacket OpCode 0x%04x", app->GetOpcode());
|
||||
|
||||
ack_req = true; // It's broke right now, dont delete this line till fix it. =P
|
||||
eqs->QueuePacket(app, ack_req);
|
||||
@ -1430,27 +1430,27 @@ bool Client::OPCharCreate(char *name, CharCreate_Struct *cc)
|
||||
|
||||
in.s_addr = GetIP();
|
||||
|
||||
Log(Logs::Detail, Logs::World_Server, "Character creation request from %s LS#%d (%s:%d) : ", GetCLE()->LSName(), GetCLE()->LSID(), inet_ntoa(in), GetPort());
|
||||
Log(Logs::Detail, Logs::World_Server, "Name: %s", name);
|
||||
Log(Logs::Detail, Logs::World_Server, "Race: %d Class: %d Gender: %d Deity: %d Start zone: %d Tutorial: %s",
|
||||
Log(Logs::Detail, Logs::WorldServer, "Character creation request from %s LS#%d (%s:%d) : ", GetCLE()->LSName(), GetCLE()->LSID(), inet_ntoa(in), GetPort());
|
||||
Log(Logs::Detail, Logs::WorldServer, "Name: %s", name);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Race: %d Class: %d Gender: %d Deity: %d Start zone: %d Tutorial: %s",
|
||||
cc->race, cc->class_, cc->gender, cc->deity, cc->start_zone, cc->tutorial ? "true" : "false");
|
||||
Log(Logs::Detail, Logs::World_Server, "STR STA AGI DEX WIS INT CHA Total");
|
||||
Log(Logs::Detail, Logs::World_Server, "%3d %3d %3d %3d %3d %3d %3d %3d",
|
||||
Log(Logs::Detail, Logs::WorldServer, "STR STA AGI DEX WIS INT CHA Total");
|
||||
Log(Logs::Detail, Logs::WorldServer, "%3d %3d %3d %3d %3d %3d %3d %3d",
|
||||
cc->STR, cc->STA, cc->AGI, cc->DEX, cc->WIS, cc->INT, cc->CHA,
|
||||
stats_sum);
|
||||
Log(Logs::Detail, Logs::World_Server, "Face: %d Eye colors: %d %d", cc->face, cc->eyecolor1, cc->eyecolor2);
|
||||
Log(Logs::Detail, Logs::World_Server, "Hairstyle: %d Haircolor: %d", cc->hairstyle, cc->haircolor);
|
||||
Log(Logs::Detail, Logs::World_Server, "Beard: %d Beardcolor: %d", cc->beard, cc->beardcolor);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Face: %d Eye colors: %d %d", cc->face, cc->eyecolor1, cc->eyecolor2);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Hairstyle: %d Haircolor: %d", cc->hairstyle, cc->haircolor);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Beard: %d Beardcolor: %d", cc->beard, cc->beardcolor);
|
||||
|
||||
/* Validate the char creation struct */
|
||||
if (m_ClientVersionBit & EQEmu::versions::maskSoFAndLater) {
|
||||
if (!CheckCharCreateInfoSoF(cc)) {
|
||||
Log(Logs::Detail, Logs::World_Server,"CheckCharCreateInfo did not validate the request (bad race/class/stats)");
|
||||
Log(Logs::Detail, Logs::WorldServer, "CheckCharCreateInfo did not validate the request (bad race/class/stats)");
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!CheckCharCreateInfoTitanium(cc)) {
|
||||
Log(Logs::Detail, Logs::World_Server,"CheckCharCreateInfo did not validate the request (bad race/class/stats)");
|
||||
Log(Logs::Detail, Logs::WorldServer, "CheckCharCreateInfo did not validate the request (bad race/class/stats)");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -1512,14 +1512,14 @@ bool Client::OPCharCreate(char *name, CharCreate_Struct *cc)
|
||||
|
||||
/* If it is an SoF Client and the SoF Start Zone rule is set, send new chars there */
|
||||
if (m_ClientVersionBit & EQEmu::versions::maskSoFAndLater) {
|
||||
Log(Logs::Detail, Logs::World_Server,"Found 'SoFStartZoneID' rule setting: %i", RuleI(World, SoFStartZoneID));
|
||||
Log(Logs::Detail, Logs::WorldServer, "Found 'SoFStartZoneID' rule setting: %i", RuleI(World, SoFStartZoneID));
|
||||
if (RuleI(World, SoFStartZoneID) > 0) {
|
||||
pp.zone_id = RuleI(World, SoFStartZoneID);
|
||||
cc->start_zone = pp.zone_id;
|
||||
}
|
||||
}
|
||||
else {
|
||||
Log(Logs::General, Logs::World_Server, "Found 'TitaniumStartZoneID' rule setting: %i", RuleI(World, TitaniumStartZoneID));
|
||||
Log(Logs::General, Logs::WorldServer, "Found 'TitaniumStartZoneID' rule setting: %i", RuleI(World, TitaniumStartZoneID));
|
||||
if (RuleI(World, TitaniumStartZoneID) > 0) { /* if there's a startzone variable put them in there */
|
||||
|
||||
pp.zone_id = RuleI(World, TitaniumStartZoneID);
|
||||
@ -1579,12 +1579,12 @@ bool Client::OPCharCreate(char *name, CharCreate_Struct *cc)
|
||||
pp.binds[0].heading = pp.heading;
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::World_Server,"Current location: %s (%d) %0.2f, %0.2f, %0.2f, %0.2f",
|
||||
Log(Logs::Detail, Logs::WorldServer, "Current location: %s (%d) %0.2f, %0.2f, %0.2f, %0.2f",
|
||||
database.GetZoneName(pp.zone_id), pp.zone_id, pp.x, pp.y, pp.z, pp.heading);
|
||||
Log(Logs::Detail, Logs::World_Server,"Bind location: %s (%d) %0.2f, %0.2f, %0.2f",
|
||||
database.GetZoneName(pp.binds[0].zoneId), pp.binds[0].zoneId, pp.binds[0].x, pp.binds[0].y, pp.binds[0].z);
|
||||
Log(Logs::Detail, Logs::World_Server,"Home location: %s (%d) %0.2f, %0.2f, %0.2f",
|
||||
database.GetZoneName(pp.binds[4].zoneId), pp.binds[4].zoneId, pp.binds[4].x, pp.binds[4].y, pp.binds[4].z);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Bind location: %s (%d) %0.2f, %0.2f, %0.2f",
|
||||
database.GetZoneName(pp.binds[0].zoneId), pp.binds[0].zoneId, pp.binds[0].x, pp.binds[0].y, pp.binds[0].z);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Home location: %s (%d) %0.2f, %0.2f, %0.2f",
|
||||
database.GetZoneName(pp.binds[4].zoneId), pp.binds[4].zoneId, pp.binds[4].x, pp.binds[4].y, pp.binds[4].z);
|
||||
|
||||
/* Starting Items inventory */
|
||||
database.SetStartingItems(&pp, &inv, pp.race, pp.class_, pp.deity, pp.zone_id, pp.name, GetAdmin());
|
||||
@ -1592,10 +1592,10 @@ bool Client::OPCharCreate(char *name, CharCreate_Struct *cc)
|
||||
// now we give the pp and the inv we made to StoreCharacter
|
||||
// to see if we can store it
|
||||
if (!database.StoreCharacter(GetAccountID(), &pp, &inv)) {
|
||||
Log(Logs::Detail, Logs::World_Server,"Character creation failed: %s", pp.name);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Character creation failed: %s", pp.name);
|
||||
return false;
|
||||
}
|
||||
Log(Logs::Detail, Logs::World_Server,"Character creation successful: %s", pp.name);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Character creation successful: %s", pp.name);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1605,7 +1605,7 @@ bool CheckCharCreateInfoSoF(CharCreate_Struct *cc)
|
||||
if (!cc)
|
||||
return false;
|
||||
|
||||
Log(Logs::Detail, Logs::World_Server, "Validating char creation info...");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Validating char creation info...");
|
||||
|
||||
RaceClassCombos class_combo;
|
||||
bool found = false;
|
||||
@ -1622,7 +1622,7 @@ bool CheckCharCreateInfoSoF(CharCreate_Struct *cc)
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Could not find class/race/deity/start_zone combination");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Could not find class/race/deity/start_zone combination");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1639,7 +1639,7 @@ bool CheckCharCreateInfoSoF(CharCreate_Struct *cc)
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Could not find starting stats for selected character combo, cannot verify stats");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Could not find starting stats for selected character combo, cannot verify stats");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1652,37 +1652,37 @@ bool CheckCharCreateInfoSoF(CharCreate_Struct *cc)
|
||||
allocation.DefaultPointAllocation[6];
|
||||
|
||||
if (cc->STR > allocation.BaseStats[0] + max_stats || cc->STR < allocation.BaseStats[0]) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Strength out of range");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Strength out of range");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cc->DEX > allocation.BaseStats[1] + max_stats || cc->DEX < allocation.BaseStats[1]) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Dexterity out of range");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Dexterity out of range");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cc->AGI > allocation.BaseStats[2] + max_stats || cc->AGI < allocation.BaseStats[2]) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Agility out of range");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Agility out of range");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cc->STA > allocation.BaseStats[3] + max_stats || cc->STA < allocation.BaseStats[3]) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Stamina out of range");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Stamina out of range");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cc->INT > allocation.BaseStats[4] + max_stats || cc->INT < allocation.BaseStats[4]) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Intelligence out of range");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Intelligence out of range");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cc->WIS > allocation.BaseStats[5] + max_stats || cc->WIS < allocation.BaseStats[5]) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Wisdom out of range");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Wisdom out of range");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (cc->CHA > allocation.BaseStats[6] + max_stats || cc->CHA < allocation.BaseStats[6]) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Charisma out of range");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Charisma out of range");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1695,7 +1695,7 @@ bool CheckCharCreateInfoSoF(CharCreate_Struct *cc)
|
||||
current_stats += cc->WIS - allocation.BaseStats[5];
|
||||
current_stats += cc->CHA - allocation.BaseStats[6];
|
||||
if (current_stats > max_stats) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Current Stats > Maximum Stats");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Current Stats > Maximum Stats");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1776,7 +1776,7 @@ bool CheckCharCreateInfoTitanium(CharCreate_Struct *cc)
|
||||
if (!cc)
|
||||
return false;
|
||||
|
||||
Log(Logs::Detail, Logs::World_Server,"Validating char creation info...");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Validating char creation info...");
|
||||
|
||||
classtemp = cc->class_ - 1;
|
||||
racetemp = cc->race - 1;
|
||||
@ -1789,16 +1789,16 @@ bool CheckCharCreateInfoTitanium(CharCreate_Struct *cc)
|
||||
// if out of range looking it up in the table would crash stuff
|
||||
// so we return from these
|
||||
if (classtemp >= PLAYER_CLASS_COUNT) {
|
||||
Log(Logs::Detail, Logs::World_Server," class is out of range");
|
||||
Log(Logs::Detail, Logs::WorldServer, " class is out of range");
|
||||
return false;
|
||||
}
|
||||
if (racetemp >= _TABLE_RACES) {
|
||||
Log(Logs::Detail, Logs::World_Server," race is out of range");
|
||||
Log(Logs::Detail, Logs::WorldServer, " race is out of range");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!ClassRaceLookupTable[classtemp][racetemp]) { //Lookup table better than a bunch of ifs?
|
||||
Log(Logs::Detail, Logs::World_Server," invalid race/class combination");
|
||||
Log(Logs::Detail, Logs::WorldServer, " invalid race/class combination");
|
||||
// we return from this one, since if it's an invalid combination our table
|
||||
// doesn't have meaningful values for the stats
|
||||
return false;
|
||||
@ -1826,43 +1826,43 @@ bool CheckCharCreateInfoTitanium(CharCreate_Struct *cc)
|
||||
// that are messed up not just the first hit
|
||||
|
||||
if (bTOTAL + stat_points != cTOTAL) {
|
||||
Log(Logs::Detail, Logs::World_Server," stat points total doesn't match expected value: expecting %d got %d", bTOTAL + stat_points, cTOTAL);
|
||||
Log(Logs::Detail, Logs::WorldServer, " stat points total doesn't match expected value: expecting %d got %d", bTOTAL + stat_points, cTOTAL);
|
||||
Charerrors++;
|
||||
}
|
||||
|
||||
if (cc->STR > bSTR + stat_points || cc->STR < bSTR) {
|
||||
Log(Logs::Detail, Logs::World_Server," stat STR is out of range");
|
||||
Log(Logs::Detail, Logs::WorldServer, " stat STR is out of range");
|
||||
Charerrors++;
|
||||
}
|
||||
if (cc->STA > bSTA + stat_points || cc->STA < bSTA) {
|
||||
Log(Logs::Detail, Logs::World_Server," stat STA is out of range");
|
||||
Log(Logs::Detail, Logs::WorldServer, " stat STA is out of range");
|
||||
Charerrors++;
|
||||
}
|
||||
if (cc->AGI > bAGI + stat_points || cc->AGI < bAGI) {
|
||||
Log(Logs::Detail, Logs::World_Server," stat AGI is out of range");
|
||||
Log(Logs::Detail, Logs::WorldServer, " stat AGI is out of range");
|
||||
Charerrors++;
|
||||
}
|
||||
if (cc->DEX > bDEX + stat_points || cc->DEX < bDEX) {
|
||||
Log(Logs::Detail, Logs::World_Server," stat DEX is out of range");
|
||||
Log(Logs::Detail, Logs::WorldServer, " stat DEX is out of range");
|
||||
Charerrors++;
|
||||
}
|
||||
if (cc->WIS > bWIS + stat_points || cc->WIS < bWIS) {
|
||||
Log(Logs::Detail, Logs::World_Server," stat WIS is out of range");
|
||||
Log(Logs::Detail, Logs::WorldServer, " stat WIS is out of range");
|
||||
Charerrors++;
|
||||
}
|
||||
if (cc->INT > bINT + stat_points || cc->INT < bINT) {
|
||||
Log(Logs::Detail, Logs::World_Server," stat INT is out of range");
|
||||
Log(Logs::Detail, Logs::WorldServer, " stat INT is out of range");
|
||||
Charerrors++;
|
||||
}
|
||||
if (cc->CHA > bCHA + stat_points || cc->CHA < bCHA) {
|
||||
Log(Logs::Detail, Logs::World_Server," stat CHA is out of range");
|
||||
Log(Logs::Detail, Logs::WorldServer, " stat CHA is out of range");
|
||||
Charerrors++;
|
||||
}
|
||||
|
||||
/*TODO: Check for deity/class/race.. it'd be nice, but probably of any real use to hack(faction, deity based items are all I can think of)
|
||||
I am NOT writing those tables - kathgar*/
|
||||
|
||||
Log(Logs::Detail, Logs::World_Server,"Found %d errors in character creation request", Charerrors);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Found %d errors in character creation request", Charerrors);
|
||||
|
||||
return Charerrors == 0;
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ void ClientListEntry::SetOnline(ZoneServer* iZS, CLE_Status iOnline) {
|
||||
void ClientListEntry::SetOnline(CLE_Status iOnline)
|
||||
{
|
||||
Log(Logs::General,
|
||||
Logs::World_Server,
|
||||
Logs::WorldServer,
|
||||
"ClientListEntry::SetOnline for %s(%i) = %i",
|
||||
AccountName(),
|
||||
AccountID(),
|
||||
|
||||
@ -63,7 +63,7 @@ void ClientList::Process() {
|
||||
if (!iterator.GetData()->Process()) {
|
||||
struct in_addr in;
|
||||
in.s_addr = iterator.GetData()->GetIP();
|
||||
Log(Logs::Detail, Logs::World_Server,"Removing client from %s:%d", inet_ntoa(in), iterator.GetData()->GetPort());
|
||||
Log(Logs::Detail, Logs::WorldServer, "Removing client from %s:%d", inet_ntoa(in), iterator.GetData()->GetPort());
|
||||
iterator.RemoveCurrent();
|
||||
}
|
||||
else
|
||||
@ -110,16 +110,16 @@ void ClientList::GetCLEIP(uint32 iIP) {
|
||||
countCLEIPs = iterator.GetData();
|
||||
if ((countCLEIPs->GetIP() == iIP) && ((countCLEIPs->Admin() < (RuleI(World, ExemptMaxClientsStatus))) || (RuleI(World, ExemptMaxClientsStatus) < 0))) { // If the IP matches, and the connection admin status is below the exempt status, or exempt status is less than 0 (no-one is exempt)
|
||||
IPInstances++; // Increment the occurences of this IP address
|
||||
Log(Logs::General, Logs::Client_Login, "Account ID: %i Account Name: %s IP: %s.", countCLEIPs->LSID(), countCLEIPs->LSName(), long2ip(countCLEIPs->GetIP()).c_str());
|
||||
Log(Logs::General, Logs::ClientLogin, "Account ID: %i Account Name: %s IP: %s.", countCLEIPs->LSID(), countCLEIPs->LSName(), long2ip(countCLEIPs->GetIP()).c_str());
|
||||
if (RuleB(World, EnableIPExemptions)) {
|
||||
Log(Logs::General, Logs::Client_Login, "Account ID: %i Account Name: %s IP: %s IP Instances: %i Max IP Instances: %i", countCLEIPs->LSID(), countCLEIPs->LSName(), long2ip(countCLEIPs->GetIP()).c_str(), IPInstances, database.GetIPExemption(long2ip(countCLEIPs->GetIP()).c_str()));
|
||||
Log(Logs::General, Logs::ClientLogin, "Account ID: %i Account Name: %s IP: %s IP Instances: %i Max IP Instances: %i", countCLEIPs->LSID(), countCLEIPs->LSName(), long2ip(countCLEIPs->GetIP()).c_str(), IPInstances, database.GetIPExemption(long2ip(countCLEIPs->GetIP()).c_str()));
|
||||
if (IPInstances > database.GetIPExemption(long2ip(countCLEIPs->GetIP()).c_str())) {
|
||||
if(RuleB(World, IPLimitDisconnectAll)) {
|
||||
Log(Logs::General, Logs::Client_Login, "Disconnect: All accounts on IP %s", long2ip(countCLEIPs->GetIP()).c_str());
|
||||
Log(Logs::General, Logs::ClientLogin, "Disconnect: All accounts on IP %s", long2ip(countCLEIPs->GetIP()).c_str());
|
||||
DisconnectByIP(iIP);
|
||||
return;
|
||||
} else {
|
||||
Log(Logs::General, Logs::Client_Login, "Disconnect: Account %s on IP %s.", countCLEIPs->LSName(), long2ip(countCLEIPs->GetIP()).c_str());
|
||||
Log(Logs::General, Logs::ClientLogin, "Disconnect: Account %s on IP %s.", countCLEIPs->LSName(), long2ip(countCLEIPs->GetIP()).c_str());
|
||||
countCLEIPs->SetOnline(CLE_Status::Offline);
|
||||
iterator.RemoveCurrent();
|
||||
continue;
|
||||
@ -128,14 +128,14 @@ void ClientList::GetCLEIP(uint32 iIP) {
|
||||
} else {
|
||||
if (IPInstances > (RuleI(World, MaxClientsPerIP))) { // If the number of connections exceeds the lower limit
|
||||
if (RuleB(World, MaxClientsSetByStatus)) { // If MaxClientsSetByStatus is set to True, override other IP Limit Rules
|
||||
Log(Logs::General, Logs::Client_Login, "Account ID: %i Account Name: %s IP: %s IP Instances: %i Max IP Instances: %i", countCLEIPs->LSID(), countCLEIPs->LSName(), long2ip(countCLEIPs->GetIP()).c_str(), IPInstances, countCLEIPs->Admin());
|
||||
Log(Logs::General, Logs::ClientLogin, "Account ID: %i Account Name: %s IP: %s IP Instances: %i Max IP Instances: %i", countCLEIPs->LSID(), countCLEIPs->LSName(), long2ip(countCLEIPs->GetIP()).c_str(), IPInstances, countCLEIPs->Admin());
|
||||
if (IPInstances > countCLEIPs->Admin()) { // The IP Limit is set by the status of the account if status > MaxClientsPerIP
|
||||
if(RuleB(World, IPLimitDisconnectAll)) {
|
||||
Log(Logs::General, Logs::Client_Login, "Disconnect: All accounts on IP %s", long2ip(countCLEIPs->GetIP()).c_str());
|
||||
Log(Logs::General, Logs::ClientLogin, "Disconnect: All accounts on IP %s", long2ip(countCLEIPs->GetIP()).c_str());
|
||||
DisconnectByIP(iIP);
|
||||
return;
|
||||
} else {
|
||||
Log(Logs::General, Logs::Client_Login, "Disconnect: Account %s on IP %s.", countCLEIPs->LSName(), long2ip(countCLEIPs->GetIP()).c_str());
|
||||
Log(Logs::General, Logs::ClientLogin, "Disconnect: Account %s on IP %s.", countCLEIPs->LSName(), long2ip(countCLEIPs->GetIP()).c_str());
|
||||
countCLEIPs->SetOnline(CLE_Status::Offline); // Remove the connection
|
||||
iterator.RemoveCurrent();
|
||||
continue;
|
||||
@ -143,22 +143,22 @@ void ClientList::GetCLEIP(uint32 iIP) {
|
||||
}
|
||||
} else if ((countCLEIPs->Admin() < RuleI(World, AddMaxClientsStatus)) || (RuleI(World, AddMaxClientsStatus) < 0)) { // Else if the Admin status of the connection is not eligible for the higher limit, or there is no higher limit (AddMaxClientStatus < 0)
|
||||
if(RuleB(World, IPLimitDisconnectAll)) {
|
||||
Log(Logs::General, Logs::Client_Login, "Disconnect: All accounts on IP %s", long2ip(countCLEIPs->GetIP()).c_str());
|
||||
Log(Logs::General, Logs::ClientLogin, "Disconnect: All accounts on IP %s", long2ip(countCLEIPs->GetIP()).c_str());
|
||||
DisconnectByIP(iIP);
|
||||
return;
|
||||
} else {
|
||||
Log(Logs::General, Logs::Client_Login, "Disconnect: Account %s on IP %s.", countCLEIPs->LSName(), long2ip(countCLEIPs->GetIP()).c_str());
|
||||
Log(Logs::General, Logs::ClientLogin, "Disconnect: Account %s on IP %s.", countCLEIPs->LSName(), long2ip(countCLEIPs->GetIP()).c_str());
|
||||
countCLEIPs->SetOnline(CLE_Status::Offline); // Remove the connection
|
||||
iterator.RemoveCurrent();
|
||||
continue;
|
||||
}
|
||||
} else if (IPInstances > RuleI(World, AddMaxClientsPerIP)) { // else they are eligible for the higher limit, but if they exceed that
|
||||
if(RuleB(World, IPLimitDisconnectAll)) {
|
||||
Log(Logs::General, Logs::Client_Login, "Disconnect: All accounts on IP %s", long2ip(countCLEIPs->GetIP()).c_str());
|
||||
Log(Logs::General, Logs::ClientLogin, "Disconnect: All accounts on IP %s", long2ip(countCLEIPs->GetIP()).c_str());
|
||||
DisconnectByIP(iIP);
|
||||
return;
|
||||
} else {
|
||||
Log(Logs::General, Logs::Client_Login, "Disconnect: Account %s on IP %s.", countCLEIPs->LSName(), long2ip(countCLEIPs->GetIP()).c_str());
|
||||
Log(Logs::General, Logs::ClientLogin, "Disconnect: Account %s on IP %s.", countCLEIPs->LSName(), long2ip(countCLEIPs->GetIP()).c_str());
|
||||
countCLEIPs->SetOnline(CLE_Status::Offline); // Remove the connection
|
||||
iterator.RemoveCurrent();
|
||||
continue;
|
||||
@ -399,7 +399,7 @@ void ClientList::SendOnlineGuildMembers(uint32 FromID, uint32 GuildID)
|
||||
|
||||
if(!from)
|
||||
{
|
||||
Log(Logs::Detail, Logs::World_Server,"Invalid client. FromID=%i GuildID=%i", FromID, GuildID);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Invalid client. FromID=%i GuildID=%i", FromID, GuildID);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -724,7 +724,7 @@ void ClientList::SendWhoAll(uint32 fromid,const char* to, int16 admin, Who_All_S
|
||||
safe_delete_array(output);
|
||||
}
|
||||
catch(...){
|
||||
Log(Logs::Detail, Logs::World_Server,"Unknown error in world's SendWhoAll (probably mem error), ignoring...");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Unknown error in world's SendWhoAll (probably mem error), ignoring...");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -867,7 +867,7 @@ void ClientList::SendFriendsWho(ServerFriendsWho_Struct *FriendsWho, WorldTCPCon
|
||||
safe_delete(pack2);
|
||||
}
|
||||
catch(...){
|
||||
Log(Logs::Detail, Logs::World_Server,"Unknown error in world's SendFriendsWho (probably mem error), ignoring...");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Unknown error in world's SendFriendsWho (probably mem error), ignoring...");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -1103,7 +1103,7 @@ Client* ClientList::FindByAccountID(uint32 account_id) {
|
||||
|
||||
iterator.Reset();
|
||||
while(iterator.MoreElements()) {
|
||||
Log(Logs::Detail, Logs::World_Server, "ClientList[0x%08x]::FindByAccountID(%p) iterator.GetData()[%p]", this, account_id, iterator.GetData());
|
||||
Log(Logs::Detail, Logs::WorldServer, "ClientList[0x%08x]::FindByAccountID(%p) iterator.GetData()[%p]", this, account_id, iterator.GetData());
|
||||
if (iterator.GetData()->GetAccountID() == account_id) {
|
||||
Client* tmp = iterator.GetData();
|
||||
return tmp;
|
||||
@ -1118,7 +1118,7 @@ Client* ClientList::FindByName(char* charname) {
|
||||
|
||||
iterator.Reset();
|
||||
while(iterator.MoreElements()) {
|
||||
Log(Logs::Detail, Logs::World_Server, "ClientList[0x%08x]::FindByName(\"%s\") iterator.GetData()[%p]", this, charname, iterator.GetData());
|
||||
Log(Logs::Detail, Logs::WorldServer, "ClientList[0x%08x]::FindByName(\"%s\") iterator.GetData()[%p]", this, charname, iterator.GetData());
|
||||
if (iterator.GetData()->GetCharName() == charname) {
|
||||
Client* tmp = iterator.GetData();
|
||||
return tmp;
|
||||
|
||||
@ -590,7 +590,7 @@ void ConsoleZoneBootup(
|
||||
strcpy(&tmpname[1], connection->UserName().c_str());
|
||||
|
||||
Log(Logs::Detail,
|
||||
Logs::World_Server,
|
||||
Logs::WorldServer,
|
||||
"Console ZoneBootup: %s, %s, %s",
|
||||
tmpname,
|
||||
args[1].c_str(),
|
||||
|
||||
@ -79,25 +79,25 @@ void LauncherLink::ProcessMessage(uint16 opcode, EQ::Net::Packet &p)
|
||||
break;
|
||||
}
|
||||
case ServerOP_ZAAuth: {
|
||||
Log(Logs::Detail, Logs::World_Server, "Got authentication from %s when they are already authenticated.", m_name.c_str());
|
||||
Log(Logs::Detail, Logs::WorldServer, "Got authentication from %s when they are already authenticated.", m_name.c_str());
|
||||
break;
|
||||
}
|
||||
case ServerOP_LauncherConnectInfo: {
|
||||
const LauncherConnectInfo *it = (const LauncherConnectInfo *)pack->pBuffer;
|
||||
if (HasName()) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Launcher '%s' received an additional connect packet with name '%s'. Ignoring.", m_name.c_str(), it->name);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Launcher '%s' received an additional connect packet with name '%s'. Ignoring.", m_name.c_str(), it->name);
|
||||
break;
|
||||
}
|
||||
m_name = it->name;
|
||||
|
||||
EQLConfig *config = launcher_list.GetConfig(m_name.c_str());
|
||||
if (config == nullptr) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Unknown launcher '%s' connected. Disconnecting.", it->name);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Unknown launcher '%s' connected. Disconnecting.", it->name);
|
||||
Disconnect();
|
||||
break;
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::World_Server, "Launcher Identified itself as '%s'. Loading zone list.", it->name);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Launcher Identified itself as '%s'. Loading zone list.", it->name);
|
||||
|
||||
std::vector<LauncherZone> result;
|
||||
//database.GetLauncherZones(it->name, result);
|
||||
@ -111,7 +111,7 @@ void LauncherLink::ProcessMessage(uint16 opcode, EQ::Net::Packet &p)
|
||||
zs.port = cur->port;
|
||||
zs.up = false;
|
||||
zs.starts = 0;
|
||||
Log(Logs::Detail, Logs::World_Server, "%s: Loaded zone '%s' on port %d", m_name.c_str(), cur->name.c_str(), zs.port);
|
||||
Log(Logs::Detail, Logs::WorldServer, "%s: Loaded zone '%s' on port %d", m_name.c_str(), cur->name.c_str(), zs.port);
|
||||
m_states[cur->name] = zs;
|
||||
}
|
||||
|
||||
@ -127,17 +127,17 @@ void LauncherLink::ProcessMessage(uint16 opcode, EQ::Net::Packet &p)
|
||||
std::map<std::string, ZoneState>::iterator res;
|
||||
res = m_states.find(it->short_name);
|
||||
if (res == m_states.end()) {
|
||||
Log(Logs::Detail, Logs::World_Server, "%s: reported state for zone %s which it does not have.", m_name.c_str(), it->short_name);
|
||||
Log(Logs::Detail, Logs::WorldServer, "%s: reported state for zone %s which it does not have.", m_name.c_str(), it->short_name);
|
||||
break;
|
||||
}
|
||||
Log(Logs::Detail, Logs::World_Server, "%s: %s reported state %s (%d starts)", m_name.c_str(), it->short_name, it->running ? "STARTED" : "STOPPED", it->start_count);
|
||||
Log(Logs::Detail, Logs::WorldServer, "%s: %s reported state %s (%d starts)", m_name.c_str(), it->short_name, it->running ? "STARTED" : "STOPPED", it->start_count);
|
||||
res->second.up = it->running;
|
||||
res->second.starts = it->start_count;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
Log(Logs::Detail, Logs::World_Server, "Unknown ServerOPcode from launcher 0x%04x, size %d", pack->opcode, pack->size);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Unknown ServerOPcode from launcher 0x%04x, size %d", pack->opcode, pack->size);
|
||||
DumpPacket(pack->pBuffer, pack->size);
|
||||
break;
|
||||
}
|
||||
@ -153,7 +153,7 @@ void LauncherLink::BootZone(const char *short_name, uint16 port) {
|
||||
zs.port = port;
|
||||
zs.up = false;
|
||||
zs.starts = 0;
|
||||
Log(Logs::Detail, Logs::World_Server, "%s: Loaded zone '%s' on port %d", m_name.c_str(), short_name, zs.port);
|
||||
Log(Logs::Detail, Logs::WorldServer, "%s: Loaded zone '%s' on port %d", m_name.c_str(), short_name, zs.port);
|
||||
m_states[short_name] = zs;
|
||||
|
||||
StartZone(short_name, port);
|
||||
|
||||
@ -65,10 +65,10 @@ void LauncherList::Process() {
|
||||
std::map<std::string, LauncherLink *>::iterator res;
|
||||
res = m_launchers.find(name);
|
||||
if (res != m_launchers.end()) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Ghosting launcher %s", name.c_str());
|
||||
Log(Logs::Detail, Logs::WorldServer, "Ghosting launcher %s", name.c_str());
|
||||
delete res->second;
|
||||
}
|
||||
Log(Logs::Detail, Logs::World_Server, "Removing pending launcher %d. Adding %s to active list.", l->GetID(), name.c_str());
|
||||
Log(Logs::Detail, Logs::WorldServer, "Removing pending launcher %d. Adding %s to active list.", l->GetID(), name.c_str());
|
||||
//put the launcher in the list.
|
||||
m_launchers[name] = l;
|
||||
}
|
||||
@ -99,7 +99,7 @@ LauncherLink *LauncherList::FindByZone(const char *short_name) {
|
||||
|
||||
void LauncherList::Add(std::shared_ptr<EQ::Net::ServertalkServerConnection> conn) {
|
||||
auto it = new LauncherLink(nextID++, conn);
|
||||
Log(Logs::Detail, Logs::World_Server, "Adding pending launcher %d", it->GetID());
|
||||
Log(Logs::Detail, Logs::WorldServer, "Adding pending launcher %d", it->GetID());
|
||||
m_pendingLaunchers.push_back(it);
|
||||
}
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ LoginServer::~LoginServer()
|
||||
void LoginServer::ProcessUsertoWorldReqLeg(uint16_t opcode, EQ::Net::Packet &p)
|
||||
{
|
||||
const WorldConfig *Config = WorldConfig::get();
|
||||
Log(Logs::Detail, Logs::World_Server, "Recevied ServerPacket from LS OpCode 0x04x", opcode);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Recevied ServerPacket from LS OpCode 0x04x", opcode);
|
||||
|
||||
UsertoWorldRequestLegacy_Struct *utwr = (UsertoWorldRequestLegacy_Struct *) p.Data();
|
||||
uint32 id = database.GetAccountIDFromLSID("eqemu", utwr->lsaccountid);
|
||||
@ -122,7 +122,7 @@ void LoginServer::ProcessUsertoWorldReqLeg(uint16_t opcode, EQ::Net::Packet &p)
|
||||
void LoginServer::ProcessUsertoWorldReq(uint16_t opcode, EQ::Net::Packet &p)
|
||||
{
|
||||
const WorldConfig *Config = WorldConfig::get();
|
||||
Log(Logs::Detail, Logs::World_Server, "Recevied ServerPacket from LS OpCode 0x04x", opcode);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Recevied ServerPacket from LS OpCode 0x04x", opcode);
|
||||
|
||||
UsertoWorldRequest_Struct *utwr = (UsertoWorldRequest_Struct *) p.Data();
|
||||
uint32 id = database.GetAccountIDFromLSID(utwr->login, utwr->lsaccountid);
|
||||
@ -182,7 +182,7 @@ void LoginServer::ProcessUsertoWorldReq(uint16_t opcode, EQ::Net::Packet &p)
|
||||
void LoginServer::ProcessLSClientAuthLegacy(uint16_t opcode, EQ::Net::Packet &p)
|
||||
{
|
||||
const WorldConfig *Config = WorldConfig::get();
|
||||
Log(Logs::Detail, Logs::World_Server, "Received ServerPacket from LS OpCode 0x04x", opcode);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Received ServerPacket from LS OpCode 0x04x", opcode);
|
||||
|
||||
try {
|
||||
auto client_authentication_request = p.GetSerialize<ClientAuthLegacy_Struct>(0);
|
||||
@ -216,7 +216,7 @@ void LoginServer::ProcessLSClientAuthLegacy(uint16_t opcode, EQ::Net::Packet &p)
|
||||
void LoginServer::ProcessLSClientAuth(uint16_t opcode, EQ::Net::Packet &p)
|
||||
{
|
||||
const WorldConfig *Config = WorldConfig::get();
|
||||
Log(Logs::Detail, Logs::World_Server, "Received ServerPacket from LS OpCode 0x04x", opcode);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Received ServerPacket from LS OpCode 0x04x", opcode);
|
||||
|
||||
try {
|
||||
auto client_authentication_request = p.GetSerialize<ClientAuth_Struct>(0);
|
||||
@ -251,18 +251,18 @@ void LoginServer::ProcessLSClientAuth(uint16_t opcode, EQ::Net::Packet &p)
|
||||
void LoginServer::ProcessLSFatalError(uint16_t opcode, EQ::Net::Packet &p)
|
||||
{
|
||||
const WorldConfig *Config = WorldConfig::get();
|
||||
Log(Logs::Detail, Logs::World_Server, "Recevied ServerPacket from LS OpCode 0x04x", opcode);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Recevied ServerPacket from LS OpCode 0x04x", opcode);
|
||||
|
||||
Log(Logs::Detail, Logs::World_Server, "Login server responded with FatalError.");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Login server responded with FatalError.");
|
||||
if (p.Length() > 1) {
|
||||
Log(Logs::Detail, Logs::World_Server, " %s", (const char *) p.Data());
|
||||
Log(Logs::Detail, Logs::WorldServer, " %s", (const char *) p.Data());
|
||||
}
|
||||
}
|
||||
|
||||
void LoginServer::ProcessSystemwideMessage(uint16_t opcode, EQ::Net::Packet &p)
|
||||
{
|
||||
const WorldConfig *Config = WorldConfig::get();
|
||||
Log(Logs::Detail, Logs::World_Server, "Recevied ServerPacket from LS OpCode 0x04x", opcode);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Recevied ServerPacket from LS OpCode 0x04x", opcode);
|
||||
|
||||
ServerSystemwideMessage *swm = (ServerSystemwideMessage *) p.Data();
|
||||
zoneserver_list.SendEmoteMessageRaw(0, 0, 0, swm->type, swm->message);
|
||||
@ -271,20 +271,20 @@ void LoginServer::ProcessSystemwideMessage(uint16_t opcode, EQ::Net::Packet &p)
|
||||
void LoginServer::ProcessLSRemoteAddr(uint16_t opcode, EQ::Net::Packet &p)
|
||||
{
|
||||
const WorldConfig *Config = WorldConfig::get();
|
||||
Log(Logs::Detail, Logs::World_Server, "Recevied ServerPacket from LS OpCode 0x04x", opcode);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Recevied ServerPacket from LS OpCode 0x04x", opcode);
|
||||
|
||||
if (!Config->WorldAddress.length()) {
|
||||
WorldConfig::SetWorldAddress((char *) p.Data());
|
||||
Log(Logs::Detail, Logs::World_Server, "Loginserver provided %s as world address", (const char *) p.Data());
|
||||
Log(Logs::Detail, Logs::WorldServer, "Loginserver provided %s as world address", (const char *) p.Data());
|
||||
}
|
||||
}
|
||||
|
||||
void LoginServer::ProcessLSAccountUpdate(uint16_t opcode, EQ::Net::Packet &p)
|
||||
{
|
||||
const WorldConfig *Config = WorldConfig::get();
|
||||
Log(Logs::Detail, Logs::World_Server, "Recevied ServerPacket from LS OpCode 0x04x", opcode);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Recevied ServerPacket from LS OpCode 0x04x", opcode);
|
||||
|
||||
Log(Logs::Detail, Logs::World_Server, "Received ServerOP_LSAccountUpdate packet from loginserver");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Received ServerOP_LSAccountUpdate packet from loginserver");
|
||||
CanAccountUpdate = true;
|
||||
}
|
||||
|
||||
@ -292,7 +292,7 @@ bool LoginServer::Connect()
|
||||
{
|
||||
char errbuf[1024];
|
||||
if ((LoginServerIP = ResolveIP(LoginServerAddress, errbuf)) == 0) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Unable to resolve '%s' to an IP.", LoginServerAddress);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Unable to resolve '%s' to an IP.", LoginServerAddress);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -80,7 +80,7 @@ bool LoginServerList::SendPacket(ServerPacket* pack) {
|
||||
}
|
||||
|
||||
bool LoginServerList::SendAccountUpdate(ServerPacket* pack) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Requested to send ServerOP_LSAccountUpdate packet to all loginservers");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Requested to send ServerOP_LSAccountUpdate packet to all loginservers");
|
||||
for (auto &iter : m_list) {
|
||||
if ((*iter).CanUpdate()) {
|
||||
(*iter).SendAccountUpdate(pack);
|
||||
|
||||
104
world/net.cpp
104
world/net.cpp
@ -140,29 +140,29 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
|
||||
// Load server configuration
|
||||
Log(Logs::General, Logs::World_Server, "Loading server configuration..");
|
||||
Log(Logs::General, Logs::WorldServer, "Loading server configuration..");
|
||||
if (!WorldConfig::LoadConfig()) {
|
||||
Log(Logs::General, Logs::World_Server, "Loading server configuration failed.");
|
||||
Log(Logs::General, Logs::WorldServer, "Loading server configuration failed.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
Config = WorldConfig::get();
|
||||
|
||||
Log(Logs::General, Logs::World_Server, "CURRENT_VERSION: %s", CURRENT_VERSION);
|
||||
Log(Logs::General, Logs::WorldServer, "CURRENT_VERSION: %s", CURRENT_VERSION);
|
||||
|
||||
if (signal(SIGINT, CatchSignal) == SIG_ERR) {
|
||||
Log(Logs::General, Logs::World_Server, "Could not set signal handler");
|
||||
Log(Logs::General, Logs::WorldServer, "Could not set signal handler");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (signal(SIGTERM, CatchSignal) == SIG_ERR) {
|
||||
Log(Logs::General, Logs::World_Server, "Could not set signal handler");
|
||||
Log(Logs::General, Logs::WorldServer, "Could not set signal handler");
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
|
||||
Log(Logs::General, Logs::World_Server, "Could not set signal handler");
|
||||
Log(Logs::General, Logs::WorldServer, "Could not set signal handler");
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
@ -171,7 +171,7 @@ int main(int argc, char** argv) {
|
||||
if (Config->LoginCount == 0) {
|
||||
if (Config->LoginHost.length()) {
|
||||
loginserverlist.Add(Config->LoginHost.c_str(), Config->LoginPort, Config->LoginAccount.c_str(), Config->LoginPassword.c_str(), Config->LoginLegacy);
|
||||
Log(Logs::General, Logs::World_Server, "Added loginserver %s:%i", Config->LoginHost.c_str(), Config->LoginPort);
|
||||
Log(Logs::General, Logs::WorldServer, "Added loginserver %s:%i", Config->LoginHost.c_str(), Config->LoginPort);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -181,19 +181,19 @@ int main(int argc, char** argv) {
|
||||
while (iterator.MoreElements()) {
|
||||
loginserverlist.Add(iterator.GetData()->LoginHost.c_str(), iterator.GetData()->LoginPort, iterator.GetData()->LoginAccount.c_str(), iterator.GetData()->LoginPassword.c_str(),
|
||||
iterator.GetData()->LoginLegacy);
|
||||
Log(Logs::General, Logs::World_Server, "Added loginserver %s:%i", iterator.GetData()->LoginHost.c_str(), iterator.GetData()->LoginPort);
|
||||
Log(Logs::General, Logs::WorldServer, "Added loginserver %s:%i", iterator.GetData()->LoginHost.c_str(), iterator.GetData()->LoginPort);
|
||||
iterator.Advance();
|
||||
}
|
||||
}
|
||||
|
||||
Log(Logs::General, Logs::World_Server, "Connecting to MySQL %s@%s:%i...", Config->DatabaseUsername.c_str(), Config->DatabaseHost.c_str(), Config->DatabasePort);
|
||||
Log(Logs::General, Logs::WorldServer, "Connecting to MySQL %s@%s:%i...", Config->DatabaseUsername.c_str(), Config->DatabaseHost.c_str(), Config->DatabasePort);
|
||||
if (!database.Connect(
|
||||
Config->DatabaseHost.c_str(),
|
||||
Config->DatabaseUsername.c_str(),
|
||||
Config->DatabasePassword.c_str(),
|
||||
Config->DatabaseDB.c_str(),
|
||||
Config->DatabasePort)) {
|
||||
Log(Logs::General, Logs::World_Server, "Cannot continue without a database connection.");
|
||||
Log(Logs::General, Logs::WorldServer, "Cannot continue without a database connection.");
|
||||
return 1;
|
||||
}
|
||||
guild_mgr.SetDatabase(&database);
|
||||
@ -302,70 +302,70 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
|
||||
if (!ignore_db) {
|
||||
Log(Logs::General, Logs::World_Server, "Checking Database Conversions..");
|
||||
Log(Logs::General, Logs::WorldServer, "Checking Database Conversions..");
|
||||
database.CheckDatabaseConversions();
|
||||
}
|
||||
Log(Logs::General, Logs::World_Server, "Loading variables..");
|
||||
Log(Logs::General, Logs::WorldServer, "Loading variables..");
|
||||
database.LoadVariables();
|
||||
|
||||
std::string hotfix_name;
|
||||
if (database.GetVariable("hotfix_name", hotfix_name)) {
|
||||
if (!hotfix_name.empty()) {
|
||||
Log(Logs::General, Logs::Zone_Server, "Current hotfix in use: '%s'", hotfix_name.c_str());
|
||||
Log(Logs::General, Logs::ZoneServer, "Current hotfix in use: '%s'", hotfix_name.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
Log(Logs::General, Logs::World_Server, "Purging expired data buckets...");
|
||||
Log(Logs::General, Logs::WorldServer, "Purging expired data buckets...");
|
||||
database.PurgeAllDeletedDataBuckets();
|
||||
|
||||
Log(Logs::General, Logs::World_Server, "Loading zones..");
|
||||
Log(Logs::General, Logs::WorldServer, "Loading zones..");
|
||||
database.LoadZoneNames();
|
||||
Log(Logs::General, Logs::World_Server, "Clearing groups..");
|
||||
Log(Logs::General, Logs::WorldServer, "Clearing groups..");
|
||||
database.ClearGroup();
|
||||
Log(Logs::General, Logs::World_Server, "Clearing raids..");
|
||||
Log(Logs::General, Logs::WorldServer, "Clearing raids..");
|
||||
database.ClearRaid();
|
||||
database.ClearRaidDetails();
|
||||
database.ClearRaidLeader();
|
||||
Log(Logs::General, Logs::World_Server, "Clearing inventory snapshots..");
|
||||
Log(Logs::General, Logs::WorldServer, "Clearing inventory snapshots..");
|
||||
database.ClearInvSnapshots();
|
||||
Log(Logs::General, Logs::World_Server, "Loading items..");
|
||||
Log(Logs::General, Logs::WorldServer, "Loading items..");
|
||||
if (!database.LoadItems(hotfix_name))
|
||||
Log(Logs::General, Logs::World_Server, "Error: Could not load item data. But ignoring");
|
||||
Log(Logs::General, Logs::World_Server, "Loading skill caps..");
|
||||
Log(Logs::General, Logs::WorldServer, "Error: Could not load item data. But ignoring");
|
||||
Log(Logs::General, Logs::WorldServer, "Loading skill caps..");
|
||||
if (!database.LoadSkillCaps(std::string(hotfix_name)))
|
||||
Log(Logs::General, Logs::World_Server, "Error: Could not load skill cap data. But ignoring");
|
||||
Log(Logs::General, Logs::World_Server, "Loading guilds..");
|
||||
Log(Logs::General, Logs::WorldServer, "Error: Could not load skill cap data. But ignoring");
|
||||
Log(Logs::General, Logs::WorldServer, "Loading guilds..");
|
||||
guild_mgr.LoadGuilds();
|
||||
//rules:
|
||||
{
|
||||
std::string tmp;
|
||||
if (database.GetVariable("RuleSet", tmp)) {
|
||||
Log(Logs::General, Logs::World_Server, "Loading rule set '%s'", tmp.c_str());
|
||||
Log(Logs::General, Logs::WorldServer, "Loading rule set '%s'", tmp.c_str());
|
||||
if (!RuleManager::Instance()->LoadRules(&database, tmp.c_str(), false)) {
|
||||
Log(Logs::General, Logs::World_Server, "Failed to load ruleset '%s', falling back to defaults.", tmp.c_str());
|
||||
Log(Logs::General, Logs::WorldServer, "Failed to load ruleset '%s', falling back to defaults.", tmp.c_str());
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!RuleManager::Instance()->LoadRules(&database, "default", false)) {
|
||||
Log(Logs::General, Logs::World_Server, "No rule set configured, using default rules");
|
||||
Log(Logs::General, Logs::WorldServer, "No rule set configured, using default rules");
|
||||
}
|
||||
else {
|
||||
Log(Logs::General, Logs::World_Server, "Loaded default rule set 'default'", tmp.c_str());
|
||||
Log(Logs::General, Logs::WorldServer, "Loaded default rule set 'default'", tmp.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
EQEmu::InitializeDynamicLookups();
|
||||
Log(Logs::General, Logs::World_Server, "Initialized dynamic dictionary entries");
|
||||
Log(Logs::General, Logs::WorldServer, "Initialized dynamic dictionary entries");
|
||||
}
|
||||
|
||||
if (RuleB(World, ClearTempMerchantlist)) {
|
||||
Log(Logs::General, Logs::World_Server, "Clearing temporary merchant lists..");
|
||||
Log(Logs::General, Logs::WorldServer, "Clearing temporary merchant lists..");
|
||||
database.ClearMerchantTemp();
|
||||
}
|
||||
|
||||
RuleManager::Instance()->SaveRules(&database);
|
||||
|
||||
Log(Logs::General, Logs::World_Server, "Loading EQ time of day..");
|
||||
Log(Logs::General, Logs::WorldServer, "Loading EQ time of day..");
|
||||
TimeOfDay_Struct eqTime;
|
||||
time_t realtime;
|
||||
eqTime = database.LoadTime(realtime);
|
||||
@ -373,7 +373,7 @@ int main(int argc, char** argv) {
|
||||
Timer EQTimeTimer(600000);
|
||||
EQTimeTimer.Start(600000);
|
||||
|
||||
Log(Logs::General, Logs::World_Server, "Loading launcher list..");
|
||||
Log(Logs::General, Logs::WorldServer, "Loading launcher list..");
|
||||
launcher_list.LoadList();
|
||||
|
||||
std::string tmp;
|
||||
@ -381,37 +381,37 @@ int main(int argc, char** argv) {
|
||||
if (tmp.length() == 1 && tmp[0] == '1') {
|
||||
holdzones = true;
|
||||
}
|
||||
Log(Logs::General, Logs::World_Server, "Reboot zone modes %s", holdzones ? "ON" : "OFF");
|
||||
Log(Logs::General, Logs::WorldServer, "Reboot zone modes %s", holdzones ? "ON" : "OFF");
|
||||
|
||||
Log(Logs::General, Logs::World_Server, "Deleted %i stale player corpses from database", database.DeleteStalePlayerCorpses());
|
||||
Log(Logs::General, Logs::WorldServer, "Deleted %i stale player corpses from database", database.DeleteStalePlayerCorpses());
|
||||
|
||||
Log(Logs::General, Logs::World_Server, "Loading adventures...");
|
||||
Log(Logs::General, Logs::WorldServer, "Loading adventures...");
|
||||
if (!adventure_manager.LoadAdventureTemplates())
|
||||
{
|
||||
Log(Logs::General, Logs::World_Server, "Unable to load adventure templates.");
|
||||
Log(Logs::General, Logs::WorldServer, "Unable to load adventure templates.");
|
||||
}
|
||||
|
||||
if (!adventure_manager.LoadAdventureEntries())
|
||||
{
|
||||
Log(Logs::General, Logs::World_Server, "Unable to load adventure templates.");
|
||||
Log(Logs::General, Logs::WorldServer, "Unable to load adventure templates.");
|
||||
}
|
||||
|
||||
adventure_manager.Load();
|
||||
adventure_manager.LoadLeaderboardInfo();
|
||||
|
||||
Log(Logs::General, Logs::World_Server, "Purging expired instances");
|
||||
Log(Logs::General, Logs::WorldServer, "Purging expired instances");
|
||||
database.PurgeExpiredInstances();
|
||||
|
||||
Timer PurgeInstanceTimer(450000);
|
||||
PurgeInstanceTimer.Start(450000);
|
||||
|
||||
Log(Logs::General, Logs::World_Server, "Loading char create info...");
|
||||
Log(Logs::General, Logs::WorldServer, "Loading char create info...");
|
||||
database.LoadCharacterCreateAllocations();
|
||||
database.LoadCharacterCreateCombos();
|
||||
|
||||
std::unique_ptr<EQ::Net::ConsoleServer> console;
|
||||
if (Config->TelnetEnabled) {
|
||||
Log(Logs::General, Logs::World_Server, "Console (TCP) listener started.");
|
||||
Log(Logs::General, Logs::WorldServer, "Console (TCP) listener started.");
|
||||
console.reset(new EQ::Net::ConsoleServer(Config->TelnetIP, Config->TelnetTCPPort));
|
||||
RegisterConsoleFunctions(console);
|
||||
}
|
||||
@ -424,7 +424,7 @@ int main(int argc, char** argv) {
|
||||
server_opts.ipv6 = false;
|
||||
server_opts.credentials = Config->SharedKey;
|
||||
server_connection->Listen(server_opts);
|
||||
Log(Logs::General, Logs::World_Server, "Server (TCP) listener started.");
|
||||
Log(Logs::General, Logs::WorldServer, "Server (TCP) listener started.");
|
||||
|
||||
server_connection->OnConnectionIdentified("Zone", [&console](std::shared_ptr<EQ::Net::ServertalkServerConnection> connection) {
|
||||
LogInfo("New Zone Server connection from {2} at {0}:{1}",
|
||||
@ -526,7 +526,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
eqsm.OnNewConnection([&stream_identifier](std::shared_ptr<EQ::Net::EQStream> stream) {
|
||||
stream_identifier.AddStream(stream);
|
||||
LogF(Logs::Detail, Logs::World_Server, "New connection from IP {0}:{1}", stream->GetRemoteIP(), ntohs(stream->GetRemotePort()));
|
||||
LogF(Logs::Detail, Logs::WorldServer, "New connection from IP {0}:{1}", stream->GetRemoteIP(), ntohs(stream->GetRemotePort()));
|
||||
});
|
||||
|
||||
while (RunLoops) {
|
||||
@ -542,20 +542,20 @@ int main(int argc, char** argv) {
|
||||
struct in_addr in;
|
||||
in.s_addr = eqsi->GetRemoteIP();
|
||||
if (RuleB(World, UseBannedIPsTable)) { //Lieka: Check to see if we have the responsibility for blocking IPs.
|
||||
Log(Logs::Detail, Logs::World_Server, "Checking inbound connection %s against BannedIPs table", inet_ntoa(in));
|
||||
Log(Logs::Detail, Logs::WorldServer, "Checking inbound connection %s against BannedIPs table", inet_ntoa(in));
|
||||
if (!database.CheckBannedIPs(inet_ntoa(in))) { //Lieka: Check inbound IP against banned IP table.
|
||||
Log(Logs::Detail, Logs::World_Server, "Connection %s PASSED banned IPs check. Processing connection.", inet_ntoa(in));
|
||||
Log(Logs::Detail, Logs::WorldServer, "Connection %s PASSED banned IPs check. Processing connection.", inet_ntoa(in));
|
||||
auto client = new Client(eqsi);
|
||||
// @merth: client->zoneattempt=0;
|
||||
client_list.Add(client);
|
||||
}
|
||||
else {
|
||||
Log(Logs::General, Logs::World_Server, "Connection from %s FAILED banned IPs check. Closing connection.", inet_ntoa(in));
|
||||
Log(Logs::General, Logs::WorldServer, "Connection from %s FAILED banned IPs check. Closing connection.", inet_ntoa(in));
|
||||
eqsi->Close(); //Lieka: If the inbound IP is on the banned table, close the EQStream.
|
||||
}
|
||||
}
|
||||
if (!RuleB(World, UseBannedIPsTable)) {
|
||||
Log(Logs::Detail, Logs::World_Server, "New connection from %s:%d, processing connection", inet_ntoa(in), ntohs(eqsi->GetRemotePort()));
|
||||
Log(Logs::Detail, Logs::WorldServer, "New connection from %s:%d, processing connection", inet_ntoa(in), ntohs(eqsi->GetRemotePort()));
|
||||
auto client = new Client(eqsi);
|
||||
// @merth: client->zoneattempt=0;
|
||||
client_list.Add(client);
|
||||
@ -573,9 +573,9 @@ int main(int argc, char** argv) {
|
||||
TimeOfDay_Struct tod;
|
||||
zoneserver_list.worldclock.GetCurrentEQTimeOfDay(time(0), &tod);
|
||||
if (!database.SaveTime(tod.minute, tod.hour, tod.day, tod.month, tod.year))
|
||||
Log(Logs::General, Logs::World_Server, "Failed to save eqtime.");
|
||||
Log(Logs::General, Logs::WorldServer, "Failed to save eqtime.");
|
||||
else
|
||||
Log(Logs::Detail, Logs::World_Server, "EQTime successfully saved.");
|
||||
Log(Logs::Detail, Logs::WorldServer, "EQTime successfully saved.");
|
||||
}
|
||||
|
||||
zoneserver_list.Process();
|
||||
@ -594,18 +594,18 @@ int main(int argc, char** argv) {
|
||||
EQ::EventLoop::Get().Process();
|
||||
Sleep(5);
|
||||
}
|
||||
Log(Logs::General, Logs::World_Server, "World main loop completed.");
|
||||
Log(Logs::General, Logs::World_Server, "Shutting down zone connections (if any).");
|
||||
Log(Logs::General, Logs::WorldServer, "World main loop completed.");
|
||||
Log(Logs::General, Logs::WorldServer, "Shutting down zone connections (if any).");
|
||||
zoneserver_list.KillAll();
|
||||
Log(Logs::General, Logs::World_Server, "Zone (TCP) listener stopped.");
|
||||
Log(Logs::General, Logs::World_Server, "Signaling HTTP service to stop...");
|
||||
Log(Logs::General, Logs::WorldServer, "Zone (TCP) listener stopped.");
|
||||
Log(Logs::General, Logs::WorldServer, "Signaling HTTP service to stop...");
|
||||
LogSys.CloseFileLogs();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CatchSignal(int sig_num) {
|
||||
Log(Logs::General, Logs::World_Server, "Caught signal %d", sig_num);
|
||||
Log(Logs::General, Logs::WorldServer, "Caught signal %d", sig_num);
|
||||
RunLoops = false;
|
||||
}
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ void UCSConnection::SetConnection(std::shared_ptr<EQ::Net::ServertalkServerConne
|
||||
{
|
||||
if (Stream && Stream->Handle())
|
||||
{
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Incoming UCS Connection while we were already connected to a UCS.");
|
||||
Log(Logs::Detail, Logs::UCSServer, "Incoming UCS Connection while we were already connected to a UCS.");
|
||||
Stream->Handle()->Disconnect();
|
||||
}
|
||||
|
||||
@ -46,12 +46,12 @@ void UCSConnection::ProcessPacket(uint16 opcode, EQ::Net::Packet &p)
|
||||
}
|
||||
case ServerOP_ZAAuth:
|
||||
{
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Got authentication from UCS when they are already authenticated.");
|
||||
Log(Logs::Detail, Logs::UCSServer, "Got authentication from UCS when they are already authenticated.");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Unknown ServerOPcode from UCS 0x%04x, size %d", opcode, pack->size);
|
||||
Log(Logs::Detail, Logs::UCSServer, "Unknown ServerOPcode from UCS 0x%04x, size %d", opcode, pack->size);
|
||||
DumpPacket(pack->pBuffer, pack->size);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ void ZSList::KillAll() {
|
||||
void ZSList::Process() {
|
||||
|
||||
if (shutdowntimer && shutdowntimer->Check()) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Shutdown timer has expired. Telling all zones to shut down and exiting. (fake sigint)");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Shutdown timer has expired. Telling all zones to shut down and exiting. (fake sigint)");
|
||||
auto pack2 = new ServerPacket;
|
||||
pack2->opcode = ServerOP_ShutdownAll;
|
||||
pack2->size = 0;
|
||||
@ -570,7 +570,7 @@ void ZSList::RebootZone(const char* ip1, uint16 port, const char* ip2, uint32 sk
|
||||
s->port = port;
|
||||
s->zoneid = zoneid;
|
||||
if (zoneid != 0)
|
||||
Log(Logs::Detail, Logs::World_Server, "Rebooting static zone with the ID of: %i", zoneid);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Rebooting static zone with the ID of: %i", zoneid);
|
||||
tmp[z]->SendPacket(pack);
|
||||
delete pack;
|
||||
safe_delete_array(tmp);
|
||||
|
||||
@ -90,7 +90,7 @@ bool ZoneServer::SetZone(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) {
|
||||
char* longname;
|
||||
|
||||
if (iZoneID)
|
||||
Log(Logs::Detail, Logs::World_Server, "Setting to '%s' (%d:%d)%s", (zn) ? zn : "", iZoneID, iInstanceID,
|
||||
Log(Logs::Detail, Logs::WorldServer, "Setting to '%s' (%d:%d)%s", (zn) ? zn : "", iZoneID, iInstanceID,
|
||||
iStaticZone ? " (Static)" : "");
|
||||
|
||||
zone_server_zone_id = iZoneID;
|
||||
@ -541,10 +541,10 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
|
||||
RezzPlayer_Struct* sRezz = (RezzPlayer_Struct*)pack->pBuffer;
|
||||
if (zoneserver_list.SendPacket(pack)) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Sent Rez packet for %s", sRezz->rez.your_name);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Sent Rez packet for %s", sRezz->rez.your_name);
|
||||
}
|
||||
else {
|
||||
Log(Logs::Detail, Logs::World_Server, "Could not send Rez packet for %s", sRezz->rez.your_name);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Could not send Rez packet for %s", sRezz->rez.your_name);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -589,21 +589,21 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
ServerConnectInfo* sci = (ServerConnectInfo*)p.pBuffer;
|
||||
sci->port = client_port;
|
||||
SendPacket(&p);
|
||||
Log(Logs::Detail, Logs::World_Server, "Auto zone port configuration. Telling zone to use port %d", client_port);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Auto zone port configuration. Telling zone to use port %d", client_port);
|
||||
}
|
||||
else {
|
||||
client_port = sci->port;
|
||||
Log(Logs::Detail, Logs::World_Server, "Zone specified port %d.", client_port);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Zone specified port %d.", client_port);
|
||||
}
|
||||
|
||||
if (sci->address[0]) {
|
||||
strn0cpy(client_address, sci->address, 250);
|
||||
Log(Logs::Detail, Logs::World_Server, "Zone specified address %s.", sci->address);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Zone specified address %s.", sci->address);
|
||||
}
|
||||
|
||||
if (sci->local_address[0]) {
|
||||
strn0cpy(client_local_address, sci->local_address, 250);
|
||||
Log(Logs::Detail, Logs::World_Server, "Zone specified local address %s.", sci->address);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Zone specified local address %s.", sci->address);
|
||||
}
|
||||
|
||||
if (sci->process_id) {
|
||||
@ -617,7 +617,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
const LaunchName_Struct* ln = (const LaunchName_Struct*)pack->pBuffer;
|
||||
launcher_name = ln->launcher_name;
|
||||
launched_name = ln->zone_name;
|
||||
Log(Logs::Detail, Logs::World_Server, "Zone started with name %s by launcher %s", launched_name.c_str(), launcher_name.c_str());
|
||||
Log(Logs::Detail, Logs::WorldServer, "Zone started with name %s by launcher %s", launched_name.c_str(), launcher_name.c_str());
|
||||
break;
|
||||
}
|
||||
case ServerOP_ShutdownAll: {
|
||||
@ -700,12 +700,12 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
if (WorldConfig::get()->UpdateStats)
|
||||
client = client_list.FindCharacter(ztz->name);
|
||||
|
||||
Log(Logs::Detail, Logs::World_Server, "ZoneToZone request for %s current zone %d req zone %d\n",
|
||||
Log(Logs::Detail, Logs::WorldServer, "ZoneToZone request for %s current zone %d req zone %d\n",
|
||||
ztz->name, ztz->current_zone_id, ztz->requested_zone_id);
|
||||
|
||||
/* This is a request from the egress zone */
|
||||
if (GetZoneID() == ztz->current_zone_id && GetInstanceID() == ztz->current_instance_id) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Processing ZTZ for egress from zone for client %s\n", ztz->name);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Processing ZTZ for egress from zone for client %s\n", ztz->name);
|
||||
|
||||
if (ztz->admin < 80 && ztz->ignorerestrictions < 2 && zoneserver_list.IsZoneLocked(ztz->requested_zone_id)) {
|
||||
ztz->response = 0;
|
||||
@ -723,20 +723,20 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
|
||||
/* Zone was already running*/
|
||||
if (ingress_server) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Found a zone already booted for %s\n", ztz->name);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Found a zone already booted for %s\n", ztz->name);
|
||||
ztz->response = 1;
|
||||
}
|
||||
/* Boot the Zone*/
|
||||
else {
|
||||
int server_id;
|
||||
if ((server_id = zoneserver_list.TriggerBootup(ztz->requested_zone_id, ztz->requested_instance_id))) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Successfully booted a zone for %s\n", ztz->name);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Successfully booted a zone for %s\n", ztz->name);
|
||||
// bootup successful, ready to rock
|
||||
ztz->response = 1;
|
||||
ingress_server = zoneserver_list.FindByID(server_id);
|
||||
}
|
||||
else {
|
||||
Log(Logs::Detail, Logs::World_Server, "FAILED to boot a zone for %s\n", ztz->name);
|
||||
Log(Logs::Detail, Logs::WorldServer, "FAILED to boot a zone for %s\n", ztz->name);
|
||||
// bootup failed, send back error code 0
|
||||
ztz->response = 0;
|
||||
}
|
||||
@ -751,7 +751,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
/* Response from Ingress server, route back to egress */
|
||||
else {
|
||||
|
||||
Log(Logs::Detail, Logs::World_Server, "Processing ZTZ for ingress to zone for client %s\n", ztz->name);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Processing ZTZ for ingress to zone for client %s\n", ztz->name);
|
||||
ZoneServer *egress_server = nullptr;
|
||||
if (ztz->current_instance_id > 0) {
|
||||
egress_server = zoneserver_list.FindByInstanceID(ztz->current_instance_id);
|
||||
@ -769,7 +769,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
}
|
||||
case ServerOP_ClientList: {
|
||||
if (pack->size != sizeof(ServerClientList_Struct)) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Wrong size on ServerOP_ClientList. Got: %d, Expected: %d", pack->size, sizeof(ServerClientList_Struct));
|
||||
Log(Logs::Detail, Logs::WorldServer, "Wrong size on ServerOP_ClientList. Got: %d, Expected: %d", pack->size, sizeof(ServerClientList_Struct));
|
||||
break;
|
||||
}
|
||||
client_list.ClientUpdate(this, (ServerClientList_Struct*)pack->pBuffer);
|
||||
@ -778,7 +778,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
case ServerOP_ClientListKA: {
|
||||
ServerClientListKeepAlive_Struct* sclka = (ServerClientListKeepAlive_Struct*)pack->pBuffer;
|
||||
if (pack->size < 4 || pack->size != 4 + (4 * sclka->numupdates)) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Wrong size on ServerOP_ClientListKA. Got: %d, Expected: %d", pack->size, (4 + (4 * sclka->numupdates)));
|
||||
Log(Logs::Detail, Logs::WorldServer, "Wrong size on ServerOP_ClientListKA. Got: %d, Expected: %d", pack->size, (4 + (4 * sclka->numupdates)));
|
||||
break;
|
||||
}
|
||||
client_list.CLEKeepAlive(sclka->numupdates, sclka->wid);
|
||||
@ -893,7 +893,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
}
|
||||
case ServerOP_GMGoto: {
|
||||
if (pack->size != sizeof(ServerGMGoto_Struct)) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Wrong size on ServerOP_GMGoto. Got: %d, Expected: %d", pack->size, sizeof(ServerGMGoto_Struct));
|
||||
Log(Logs::Detail, Logs::WorldServer, "Wrong size on ServerOP_GMGoto. Got: %d, Expected: %d", pack->size, sizeof(ServerGMGoto_Struct));
|
||||
break;
|
||||
}
|
||||
ServerGMGoto_Struct* gmg = (ServerGMGoto_Struct*)pack->pBuffer;
|
||||
@ -913,7 +913,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
}
|
||||
case ServerOP_Lock: {
|
||||
if (pack->size != sizeof(ServerLock_Struct)) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Wrong size on ServerOP_Lock. Got: %d, Expected: %d", pack->size, sizeof(ServerLock_Struct));
|
||||
Log(Logs::Detail, Logs::WorldServer, "Wrong size on ServerOP_Lock. Got: %d, Expected: %d", pack->size, sizeof(ServerLock_Struct));
|
||||
break;
|
||||
}
|
||||
ServerLock_Struct* slock = (ServerLock_Struct*)pack->pBuffer;
|
||||
@ -938,7 +938,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
}
|
||||
case ServerOP_Motd: {
|
||||
if (pack->size != sizeof(ServerMotd_Struct)) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Wrong size on ServerOP_Motd. Got: %d, Expected: %d", pack->size, sizeof(ServerMotd_Struct));
|
||||
Log(Logs::Detail, Logs::WorldServer, "Wrong size on ServerOP_Motd. Got: %d, Expected: %d", pack->size, sizeof(ServerMotd_Struct));
|
||||
break;
|
||||
}
|
||||
ServerMotd_Struct* smotd = (ServerMotd_Struct*)pack->pBuffer;
|
||||
@ -949,7 +949,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
}
|
||||
case ServerOP_Uptime: {
|
||||
if (pack->size != sizeof(ServerUptime_Struct)) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Wrong size on ServerOP_Uptime. Got: %d, Expected: %d", pack->size, sizeof(ServerUptime_Struct));
|
||||
Log(Logs::Detail, Logs::WorldServer, "Wrong size on ServerOP_Uptime. Got: %d, Expected: %d", pack->size, sizeof(ServerUptime_Struct));
|
||||
break;
|
||||
}
|
||||
ServerUptime_Struct* sus = (ServerUptime_Struct*)pack->pBuffer;
|
||||
@ -968,7 +968,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
break;
|
||||
}
|
||||
case ServerOP_GetWorldTime: {
|
||||
Log(Logs::Detail, Logs::World_Server, "Broadcasting a world time update");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Broadcasting a world time update");
|
||||
auto pack = new ServerPacket;
|
||||
|
||||
pack->opcode = ServerOP_SyncWorldTime;
|
||||
@ -987,17 +987,17 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
break;
|
||||
}
|
||||
case ServerOP_SetWorldTime: {
|
||||
Log(Logs::Detail, Logs::World_Server, "Received SetWorldTime");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Received SetWorldTime");
|
||||
eqTimeOfDay* newtime = (eqTimeOfDay*)pack->pBuffer;
|
||||
zoneserver_list.worldclock.SetCurrentEQTimeOfDay(newtime->start_eqtime, newtime->start_realtime);
|
||||
Log(Logs::Detail, Logs::World_Server, "New time = %d-%d-%d %d:%d (%d)\n", newtime->start_eqtime.year, newtime->start_eqtime.month, (int)newtime->start_eqtime.day, (int)newtime->start_eqtime.hour, (int)newtime->start_eqtime.minute, (int)newtime->start_realtime);
|
||||
Log(Logs::Detail, Logs::WorldServer, "New time = %d-%d-%d %d:%d (%d)\n", newtime->start_eqtime.year, newtime->start_eqtime.month, (int)newtime->start_eqtime.day, (int)newtime->start_eqtime.hour, (int)newtime->start_eqtime.minute, (int)newtime->start_realtime);
|
||||
database.SaveTime((int)newtime->start_eqtime.minute, (int)newtime->start_eqtime.hour, (int)newtime->start_eqtime.day, newtime->start_eqtime.month, newtime->start_eqtime.year);
|
||||
zoneserver_list.SendTimeSync();
|
||||
break;
|
||||
}
|
||||
case ServerOP_IPLookup: {
|
||||
if (pack->size < sizeof(ServerGenericWorldQuery_Struct)) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Wrong size on ServerOP_IPLookup. Got: %d, Expected (at least): %d", pack->size, sizeof(ServerGenericWorldQuery_Struct));
|
||||
Log(Logs::Detail, Logs::WorldServer, "Wrong size on ServerOP_IPLookup. Got: %d, Expected (at least): %d", pack->size, sizeof(ServerGenericWorldQuery_Struct));
|
||||
break;
|
||||
}
|
||||
ServerGenericWorldQuery_Struct* sgwq = (ServerGenericWorldQuery_Struct*)pack->pBuffer;
|
||||
@ -1009,7 +1009,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
}
|
||||
case ServerOP_LockZone: {
|
||||
if (pack->size < sizeof(ServerLockZone_Struct)) {
|
||||
Log(Logs::Detail, Logs::World_Server, "Wrong size on ServerOP_LockZone. Got: %d, Expected: %d", pack->size, sizeof(ServerLockZone_Struct));
|
||||
Log(Logs::Detail, Logs::WorldServer, "Wrong size on ServerOP_LockZone. Got: %d, Expected: %d", pack->size, sizeof(ServerLockZone_Struct));
|
||||
break;
|
||||
}
|
||||
ServerLockZone_Struct* s = (ServerLockZone_Struct*)pack->pBuffer;
|
||||
@ -1087,7 +1087,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
zs->SendPacket(pack);
|
||||
}
|
||||
else {
|
||||
Log(Logs::Detail, Logs::World_Server, "Unable to locate zone record for instance id %u in zoneserver list for ServerOP_Consent_Response operation.", s->instance_id);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Unable to locate zone record for instance id %u in zoneserver list for ServerOP_Consent_Response operation.", s->instance_id);
|
||||
}
|
||||
safe_delete(pack);
|
||||
}
|
||||
@ -1112,7 +1112,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
zs->SendPacket(pack);
|
||||
}
|
||||
else {
|
||||
Log(Logs::Detail, Logs::World_Server, "Unable to locate zone record for zone id %u in zoneserver list for ServerOP_Consent_Response operation.", s->zone_id);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Unable to locate zone record for zone id %u in zoneserver list for ServerOP_Consent_Response operation.", s->zone_id);
|
||||
}
|
||||
safe_delete(pack);
|
||||
}
|
||||
@ -1132,7 +1132,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
zs->SendPacket(pack);
|
||||
}
|
||||
else {
|
||||
Log(Logs::Detail, Logs::World_Server, "Unable to locate zone record for zone id %u in zoneserver list for ServerOP_Consent_Response operation.", s->zone_id);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Unable to locate zone record for zone id %u in zoneserver list for ServerOP_Consent_Response operation.", s->zone_id);
|
||||
}
|
||||
safe_delete(pack);
|
||||
}
|
||||
@ -1151,7 +1151,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
zs->SendPacket(pack);
|
||||
}
|
||||
else {
|
||||
Log(Logs::Detail, Logs::World_Server, "Unable to locate zone record for instance id %u in zoneserver list for ServerOP_Consent_Response operation.", s->instance_id);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Unable to locate zone record for instance id %u in zoneserver list for ServerOP_Consent_Response operation.", s->instance_id);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1161,7 +1161,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
zs->SendPacket(pack);
|
||||
}
|
||||
else {
|
||||
Log(Logs::Detail, Logs::World_Server, "Unable to locate zone record for zone id %u in zoneserver list for ServerOP_Consent_Response operation.", s->zone_id);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Unable to locate zone record for zone id %u in zoneserver list for ServerOP_Consent_Response operation.", s->zone_id);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1263,7 +1263,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
|
||||
case ServerOP_LSAccountUpdate:
|
||||
{
|
||||
Log(Logs::Detail, Logs::World_Server, "Received ServerOP_LSAccountUpdate packet from zone");
|
||||
Log(Logs::Detail, Logs::WorldServer, "Received ServerOP_LSAccountUpdate packet from zone");
|
||||
loginserverlist.SendAccountUpdate(pack);
|
||||
break;
|
||||
}
|
||||
@ -1326,14 +1326,14 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
case ServerOP_ChangeSharedMem: {
|
||||
std::string hotfix_name = std::string((char*)pack->pBuffer);
|
||||
|
||||
Log(Logs::General, Logs::World_Server, "Loading items...");
|
||||
Log(Logs::General, Logs::WorldServer, "Loading items...");
|
||||
if (!database.LoadItems(hotfix_name)) {
|
||||
Log(Logs::General, Logs::World_Server, "Error: Could not load item data. But ignoring");
|
||||
Log(Logs::General, Logs::WorldServer, "Error: Could not load item data. But ignoring");
|
||||
}
|
||||
|
||||
Log(Logs::General, Logs::World_Server, "Loading skill caps...");
|
||||
Log(Logs::General, Logs::WorldServer, "Loading skill caps...");
|
||||
if (!database.LoadSkillCaps(hotfix_name)) {
|
||||
Log(Logs::General, Logs::World_Server, "Error: Could not load skill cap data. But ignoring");
|
||||
Log(Logs::General, Logs::WorldServer, "Error: Could not load skill cap data. But ignoring");
|
||||
}
|
||||
|
||||
zoneserver_list.SendPacket(pack);
|
||||
@ -1352,7 +1352,7 @@ void ZoneServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p) {
|
||||
}
|
||||
default:
|
||||
{
|
||||
Log(Logs::Detail, Logs::World_Server, "Unknown ServerOPcode from zone 0x%04x, size %d", pack->opcode, pack->size);
|
||||
Log(Logs::Detail, Logs::WorldServer, "Unknown ServerOPcode from zone 0x%04x, size %d", pack->opcode, pack->size);
|
||||
DumpPacket(pack->pBuffer, pack->size);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -766,7 +766,7 @@ bool Client::SendAllPackets() {
|
||||
if(eqs)
|
||||
eqs->FastQueuePacket((EQApplicationPacket **)&cp->app, cp->ack_req);
|
||||
clientpackets.pop_front();
|
||||
Log(Logs::Moderate, Logs::Client_Server_Packet, "Transmitting a packet");
|
||||
Log(Logs::Moderate, Logs::PacketClientServer, "Transmitting a packet");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -814,7 +814,7 @@ void Client::ChannelMessageReceived(uint8 chan_num, uint8 language, uint8 lang_s
|
||||
char message[4096];
|
||||
strn0cpy(message, orig_message, sizeof(message));
|
||||
|
||||
Log(Logs::Detail, Logs::Zone_Server, "Client::ChannelMessageReceived() Channel:%i message:'%s'", chan_num, message);
|
||||
Log(Logs::Detail, Logs::ZoneServer, "Client::ChannelMessageReceived() Channel:%i message:'%s'", chan_num, message);
|
||||
|
||||
if (targetname == nullptr) {
|
||||
targetname = (!GetTarget()) ? "" : GetTarget()->GetName();
|
||||
@ -1636,7 +1636,7 @@ void Client::UpdateAdmin(bool iFromDB) {
|
||||
|
||||
if(m_pp.gm)
|
||||
{
|
||||
Log(Logs::Moderate, Logs::Zone_Server, "%s - %s is a GM", __FUNCTION__ , GetName());
|
||||
Log(Logs::Moderate, Logs::ZoneServer, "%s - %s is a GM", __FUNCTION__ , GetName());
|
||||
// no need for this, having it set in pp you already start as gm
|
||||
// and it's also set in your spawn packet so other people see it too
|
||||
// SendAppearancePacket(AT_GM, 1, false);
|
||||
@ -2590,7 +2590,7 @@ void Client::SetPVP(bool toggle, bool message) {
|
||||
void Client::Kick(const std::string &reason) {
|
||||
client_state = CLIENT_KICKED;
|
||||
|
||||
Log(Logs::General, Logs::Client_Login, "Client [%s] kicked, reason [%s]", GetCleanName(), reason.c_str());
|
||||
Log(Logs::General, Logs::ClientLogin, "Client [%s] kicked, reason [%s]", GetCleanName(), reason.c_str());
|
||||
}
|
||||
|
||||
void Client::WorldKick() {
|
||||
|
||||
@ -420,14 +420,14 @@ int Client::HandlePacket(const EQApplicationPacket *app)
|
||||
if (LogSys.log_settings[Logs::LogCategory::Netcode].is_category_enabled == 1) {
|
||||
char buffer[64];
|
||||
app->build_header_dump(buffer);
|
||||
Log(Logs::Detail, Logs::Client_Server_Packet, "Dispatch opcode: %s", buffer);
|
||||
Log(Logs::Detail, Logs::PacketClientServer, "Dispatch opcode: %s", buffer);
|
||||
}
|
||||
|
||||
if (LogSys.log_settings[Logs::Client_Server_Packet].is_category_enabled == 1)
|
||||
Log(Logs::General, Logs::Client_Server_Packet, "[%s - 0x%04x] [Size: %u]", OpcodeManager::EmuToName(app->GetOpcode()), app->GetOpcode(), app->Size());
|
||||
if (LogSys.log_settings[Logs::PacketClientServer].is_category_enabled == 1)
|
||||
Log(Logs::General, Logs::PacketClientServer, "[%s - 0x%04x] [Size: %u]", OpcodeManager::EmuToName(app->GetOpcode()), app->GetOpcode(), app->Size());
|
||||
|
||||
if (LogSys.log_settings[Logs::Client_Server_Packet_With_Dump].is_category_enabled == 1)
|
||||
Log(Logs::General, Logs::Client_Server_Packet_With_Dump, "[%s - 0x%04x] [Size: %u] %s", OpcodeManager::EmuToName(app->GetOpcode()), app->GetOpcode(), app->Size(), DumpPacketToString(app).c_str());
|
||||
if (LogSys.log_settings[Logs::PacketClientServerWithDump].is_category_enabled == 1)
|
||||
Log(Logs::General, Logs::PacketClientServerWithDump, "[%s - 0x%04x] [Size: %u] %s", OpcodeManager::EmuToName(app->GetOpcode()), app->GetOpcode(), app->Size(), DumpPacketToString(app).c_str());
|
||||
|
||||
EmuOpcode opcode = app->GetOpcode();
|
||||
if (opcode == OP_AckPacket) {
|
||||
@ -475,10 +475,10 @@ int Client::HandlePacket(const EQApplicationPacket *app)
|
||||
args.push_back(const_cast<EQApplicationPacket*>(app));
|
||||
parse->EventPlayer(EVENT_UNHANDLED_OPCODE, this, "", 0, &args);
|
||||
|
||||
if (LogSys.log_settings[Logs::Client_Server_Packet_Unhandled].is_category_enabled == 1) {
|
||||
if (LogSys.log_settings[Logs::PacketClientServerUnhandled].is_category_enabled == 1) {
|
||||
char buffer[64];
|
||||
app->build_header_dump(buffer);
|
||||
Log(Logs::General, Logs::Client_Server_Packet_Unhandled, "%s %s", buffer, DumpPacketToString(app).c_str());
|
||||
Log(Logs::General, Logs::PacketClientServerUnhandled, "%s %s", buffer, DumpPacketToString(app).c_str());
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1169,7 +1169,7 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
|
||||
*/
|
||||
Client* client = entity_list.GetClientByName(cze->char_name);
|
||||
if (!zone->GetAuth(ip, cze->char_name, &WID, &account_id, &character_id, &admin, lskey, &tellsoff)) {
|
||||
Log(Logs::General, Logs::Client_Login, "%s failed zone auth check.", cze->char_name);
|
||||
Log(Logs::General, Logs::ClientLogin, "%s failed zone auth check.", cze->char_name);
|
||||
if (nullptr != client) {
|
||||
client->Save();
|
||||
client->Kick("Failed auth check");
|
||||
@ -11590,7 +11590,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
client_moved->GetRaid()->SendHPManaEndPacketsTo(client_moved);
|
||||
client_moved->GetRaid()->SendHPManaEndPacketsFrom(client_moved);
|
||||
|
||||
Log(Logs::General, Logs::HP_Update,
|
||||
Log(Logs::General, Logs::HPUpdate,
|
||||
"Client::Handle_OP_RaidCommand :: %s sending and recieving HP/Mana/End updates",
|
||||
client_moved->GetCleanName()
|
||||
);
|
||||
|
||||
@ -559,7 +559,7 @@ bool Client::Process() {
|
||||
|
||||
if (client_state != CLIENT_LINKDEAD && !eqs->CheckState(ESTABLISHED)) {
|
||||
OnDisconnect(true);
|
||||
Log(Logs::General, Logs::Zone_Server, "Client linkdead: %s", name);
|
||||
Log(Logs::General, Logs::ZoneServer, "Client linkdead: %s", name);
|
||||
|
||||
if (Admin() > 100) {
|
||||
if (GetMerc()) {
|
||||
|
||||
@ -5819,7 +5819,7 @@ void command_time(Client *c, const Seperator *sep)
|
||||
}
|
||||
c->Message(Chat::Red, "Setting world time to %s:%i (Timezone: 0)...", sep->arg[1], minutes);
|
||||
zone->SetTime(atoi(sep->arg[1])+1, minutes);
|
||||
Log(Logs::General, Logs::Zone_Server, "%s :: Setting world time to %s:%i (Timezone: 0)...", c->GetCleanName(), sep->arg[1], minutes);
|
||||
Log(Logs::General, Logs::ZoneServer, "%s :: Setting world time to %s:%i (Timezone: 0)...", c->GetCleanName(), sep->arg[1], minutes);
|
||||
}
|
||||
else {
|
||||
c->Message(Chat::Red, "To set the Time: #time HH [MM]");
|
||||
@ -5834,7 +5834,7 @@ void command_time(Client *c, const Seperator *sep)
|
||||
zone->zone_time.getEQTimeZoneMin()
|
||||
);
|
||||
c->Message(Chat::Red, "It is now %s.", timeMessage);
|
||||
Log(Logs::General, Logs::Zone_Server, "Current Time is: %s", timeMessage);
|
||||
Log(Logs::General, Logs::ZoneServer, "Current Time is: %s", timeMessage);
|
||||
}
|
||||
}
|
||||
|
||||
@ -8523,7 +8523,7 @@ void command_ucs(Client *c, const Seperator *sep)
|
||||
if (!c)
|
||||
return;
|
||||
|
||||
Log(Logs::Detail, Logs::UCS_Server, "Character %s attempting ucs reconnect while ucs server is %savailable",
|
||||
Log(Logs::Detail, Logs::UCSServer, "Character %s attempting ucs reconnect while ucs server is %savailable",
|
||||
c->GetName(), (zone->IsUCSServerAvailable() ? "" : "un"));
|
||||
|
||||
if (zone->IsUCSServerAvailable()) {
|
||||
|
||||
@ -1322,7 +1322,7 @@ void Mob::SendHPUpdate(bool skip_self /*= false*/, bool force_update_all /*= fal
|
||||
* This is to prevent excessive packet sending under trains/fast combat
|
||||
*/
|
||||
if (this->CastToClient()->hp_self_update_throttle_timer.Check() || force_update_all) {
|
||||
Log(Logs::General, Logs::HP_Update,
|
||||
Log(Logs::General, Logs::HPUpdate,
|
||||
"Mob::SendHPUpdate :: Update HP of self (%s) HP: %i last: %i skip_self: %s",
|
||||
this->GetCleanName(),
|
||||
current_hp,
|
||||
@ -1356,14 +1356,14 @@ void Mob::SendHPUpdate(bool skip_self /*= false*/, bool force_update_all /*= fal
|
||||
int8 current_hp_percent = static_cast<int8>(max_hp == 0 ? 0 : static_cast<int>(current_hp * 100 / max_hp));
|
||||
|
||||
Log(Logs::General,
|
||||
Logs::HP_Update,
|
||||
Logs::HPUpdate,
|
||||
"Mob::SendHPUpdate :: SendHPUpdate %s HP is %i last %i",
|
||||
this->GetCleanName(),
|
||||
current_hp_percent,
|
||||
last_hp_percent);
|
||||
|
||||
if (current_hp_percent == last_hp_percent && !force_update_all) {
|
||||
Log(Logs::General, Logs::HP_Update, "Mob::SendHPUpdate :: Same HP - skipping update");
|
||||
Log(Logs::General, Logs::HPUpdate, "Mob::SendHPUpdate :: Same HP - skipping update");
|
||||
ResetHPUpdateTimer();
|
||||
return;
|
||||
}
|
||||
@ -1373,7 +1373,7 @@ void Mob::SendHPUpdate(bool skip_self /*= false*/, bool force_update_all /*= fal
|
||||
this->CastToClient()->SendHPUpdateMarquee();
|
||||
}
|
||||
|
||||
Log(Logs::General, Logs::HP_Update, "Mob::SendHPUpdate :: HP Changed - Send update");
|
||||
Log(Logs::General, Logs::HPUpdate, "Mob::SendHPUpdate :: HP Changed - Send update");
|
||||
|
||||
last_hp_percent = current_hp_percent;
|
||||
}
|
||||
|
||||
66
zone/net.cpp
66
zone/net.cpp
@ -145,7 +145,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
QServ = new QueryServ;
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading server configuration..");
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading server configuration..");
|
||||
if (!ZoneConfig::LoadConfig()) {
|
||||
Log(Logs::General, Logs::Error, "Loading server configuration failed.");
|
||||
return 1;
|
||||
@ -225,7 +225,7 @@ int main(int argc, char** argv) {
|
||||
worldserver.SetLauncherName("NONE");
|
||||
}
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "Connecting to MySQL... ");
|
||||
Log(Logs::General, Logs::ZoneServer, "Connecting to MySQL... ");
|
||||
if (!database.Connect(
|
||||
Config->DatabaseHost.c_str(),
|
||||
Config->DatabaseUsername.c_str(),
|
||||
@ -255,7 +255,7 @@ int main(int argc, char** argv) {
|
||||
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
|
||||
#endif
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "CURRENT_VERSION: %s", CURRENT_VERSION);
|
||||
Log(Logs::General, Logs::ZoneServer, "CURRENT_VERSION: %s", CURRENT_VERSION);
|
||||
|
||||
/*
|
||||
* Setup nice signal handlers
|
||||
@ -275,102 +275,102 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
#endif
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "Mapping Incoming Opcodes");
|
||||
Log(Logs::General, Logs::ZoneServer, "Mapping Incoming Opcodes");
|
||||
MapOpcodes();
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading Variables");
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading Variables");
|
||||
database.LoadVariables();
|
||||
|
||||
std::string hotfix_name;
|
||||
if (database.GetVariable("hotfix_name", hotfix_name)) {
|
||||
if (!hotfix_name.empty()) {
|
||||
Log(Logs::General, Logs::Zone_Server, "Current hotfix in use: '%s'", hotfix_name.c_str());
|
||||
Log(Logs::General, Logs::ZoneServer, "Current hotfix in use: '%s'", hotfix_name.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading zone names");
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading zone names");
|
||||
database.LoadZoneNames();
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading items");
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading items");
|
||||
if (!database.LoadItems(hotfix_name)) {
|
||||
Log(Logs::General, Logs::Error, "Loading items FAILED!");
|
||||
Log(Logs::General, Logs::Error, "Failed. But ignoring error and going on...");
|
||||
}
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading npc faction lists");
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading npc faction lists");
|
||||
if (!database.LoadNPCFactionLists(hotfix_name)) {
|
||||
Log(Logs::General, Logs::Error, "Loading npcs faction lists FAILED!");
|
||||
return 1;
|
||||
}
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading loot tables");
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading loot tables");
|
||||
if (!database.LoadLoot(hotfix_name)) {
|
||||
Log(Logs::General, Logs::Error, "Loading loot FAILED!");
|
||||
return 1;
|
||||
}
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading skill caps");
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading skill caps");
|
||||
if (!database.LoadSkillCaps(std::string(hotfix_name))) {
|
||||
Log(Logs::General, Logs::Error, "Loading skill caps FAILED!");
|
||||
return 1;
|
||||
}
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading spells");
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading spells");
|
||||
if (!database.LoadSpells(hotfix_name, &SPDAT_RECORDS, &spells)) {
|
||||
Log(Logs::General, Logs::Error, "Loading spells FAILED!");
|
||||
return 1;
|
||||
}
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading base data");
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading base data");
|
||||
if (!database.LoadBaseData(hotfix_name)) {
|
||||
Log(Logs::General, Logs::Error, "Loading base data FAILED!");
|
||||
return 1;
|
||||
}
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading guilds");
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading guilds");
|
||||
guild_mgr.LoadGuilds();
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading factions");
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading factions");
|
||||
database.LoadFactionData();
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading titles");
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading titles");
|
||||
title_manager.LoadTitles();
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading tributes");
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading tributes");
|
||||
database.LoadTributes();
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading corpse timers");
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading corpse timers");
|
||||
database.GetDecayTimes(npcCorpseDecayTimes);
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading profanity list");
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading profanity list");
|
||||
if (!EQEmu::ProfanityManager::LoadProfanityList(&database))
|
||||
Log(Logs::General, Logs::Error, "Loading profanity list FAILED!");
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading commands");
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading commands");
|
||||
int retval = command_init();
|
||||
if (retval<0)
|
||||
Log(Logs::General, Logs::Error, "Command loading FAILED");
|
||||
else
|
||||
Log(Logs::General, Logs::Zone_Server, "%d commands loaded", retval);
|
||||
Log(Logs::General, Logs::ZoneServer, "%d commands loaded", retval);
|
||||
|
||||
//rules:
|
||||
{
|
||||
std::string tmp;
|
||||
if (database.GetVariable("RuleSet", tmp)) {
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading rule set '%s'", tmp.c_str());
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading rule set '%s'", tmp.c_str());
|
||||
if (!RuleManager::Instance()->LoadRules(&database, tmp.c_str(), false)) {
|
||||
Log(Logs::General, Logs::Error, "Failed to load ruleset '%s', falling back to defaults.", tmp.c_str());
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!RuleManager::Instance()->LoadRules(&database, "default", false)) {
|
||||
Log(Logs::General, Logs::Zone_Server, "No rule set configured, using default rules");
|
||||
Log(Logs::General, Logs::ZoneServer, "No rule set configured, using default rules");
|
||||
}
|
||||
else {
|
||||
Log(Logs::General, Logs::Zone_Server, "Loaded default rule set 'default'", tmp.c_str());
|
||||
Log(Logs::General, Logs::ZoneServer, "Loaded default rule set 'default'", tmp.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
EQEmu::InitializeDynamicLookups();
|
||||
Log(Logs::General, Logs::Zone_Server, "Initialized dynamic dictionary entries");
|
||||
Log(Logs::General, Logs::ZoneServer, "Initialized dynamic dictionary entries");
|
||||
}
|
||||
|
||||
#ifdef BOTS
|
||||
@ -407,7 +407,7 @@ int main(int argc, char** argv) {
|
||||
#endif
|
||||
|
||||
//now we have our parser, load the quests
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading quests");
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading quests");
|
||||
parse->ReloadQuests();
|
||||
|
||||
worldserver.Connect();
|
||||
@ -420,7 +420,7 @@ int main(int argc, char** argv) {
|
||||
#endif
|
||||
#endif
|
||||
if (!strlen(zone_name) || !strcmp(zone_name, ".")) {
|
||||
Log(Logs::General, Logs::Zone_Server, "Entering sleep mode");
|
||||
Log(Logs::General, Logs::ZoneServer, "Entering sleep mode");
|
||||
}
|
||||
else if (!Zone::Bootup(database.GetZoneID(zone_name), instance_id, true)) {
|
||||
Log(Logs::General, Logs::Error, "Zone Bootup failed :: Zone::Bootup");
|
||||
@ -464,7 +464,7 @@ int main(int argc, char** argv) {
|
||||
if (!websocker_server_opened && Config->ZonePort != 0) {
|
||||
Log(
|
||||
Logs::General,
|
||||
Logs::Zone_Server,
|
||||
Logs::ZoneServer,
|
||||
"Websocket Server listener started (%s:%u).",
|
||||
Config->TelnetIP.c_str(),
|
||||
Config->ZonePort
|
||||
@ -478,7 +478,7 @@ int main(int argc, char** argv) {
|
||||
* EQStreamManager
|
||||
*/
|
||||
if (!eqsf_open && Config->ZonePort != 0) {
|
||||
Log(Logs::General, Logs::Zone_Server, "Starting EQ Network server on port %d", Config->ZonePort);
|
||||
Log(Logs::General, Logs::ZoneServer, "Starting EQ Network server on port %d", Config->ZonePort);
|
||||
|
||||
EQStreamManagerInterfaceOptions opts(Config->ZonePort, false, RuleB(Network, CompressZoneStream));
|
||||
opts.daybreak_options.resend_delay_ms = RuleI(Network, ResendDelayBaseMS);
|
||||
@ -491,7 +491,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
eqsm->OnNewConnection([&stream_identifier](std::shared_ptr<EQ::Net::EQStream> stream) {
|
||||
stream_identifier.AddStream(stream);
|
||||
LogF(Logs::Detail, Logs::World_Server, "New connection from IP {0}:{1}", stream->GetRemoteIP(), ntohs(stream->GetRemotePort()));
|
||||
LogF(Logs::Detail, Logs::WorldServer, "New connection from IP {0}:{1}", stream->GetRemoteIP(), ntohs(stream->GetRemotePort()));
|
||||
});
|
||||
}
|
||||
|
||||
@ -503,7 +503,7 @@ int main(int argc, char** argv) {
|
||||
//now that we know what patch they are running, start up their client object
|
||||
struct in_addr in;
|
||||
in.s_addr = eqsi->GetRemoteIP();
|
||||
Log(Logs::Detail, Logs::World_Server, "New client from %s:%d", inet_ntoa(in), ntohs(eqsi->GetRemotePort()));
|
||||
Log(Logs::Detail, Logs::WorldServer, "New client from %s:%d", inet_ntoa(in), ntohs(eqsi->GetRemotePort()));
|
||||
auto client = new Client(eqsi);
|
||||
entity_list.AddClient(client);
|
||||
}
|
||||
@ -607,7 +607,7 @@ int main(int argc, char** argv) {
|
||||
bot_command_deinit();
|
||||
#endif
|
||||
safe_delete(parse);
|
||||
Log(Logs::General, Logs::Zone_Server, "Proper zone shutdown complete.");
|
||||
Log(Logs::General, Logs::ZoneServer, "Proper zone shutdown complete.");
|
||||
LogSys.CloseFileLogs();
|
||||
return 0;
|
||||
}
|
||||
@ -623,7 +623,7 @@ void Shutdown()
|
||||
{
|
||||
Zone::Shutdown(true);
|
||||
RunLoops = false;
|
||||
Log(Logs::General, Logs::Zone_Server, "Shutting down...");
|
||||
Log(Logs::General, Logs::ZoneServer, "Shutting down...");
|
||||
LogSys.CloseFileLogs();
|
||||
}
|
||||
|
||||
|
||||
@ -473,7 +473,7 @@ void Object::RandomSpawn(bool send_packet) {
|
||||
}
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::Zone_Server, "Object::RandomSpawn(%s): %d (%.2f, %.2f, %.2f)", m_data.object_name, m_inst->GetID(), m_data.x, m_data.y, m_data.z);
|
||||
Log(Logs::Detail, Logs::ZoneServer, "Object::RandomSpawn(%s): %d (%.2f, %.2f, %.2f)", m_data.object_name, m_inst->GetID(), m_data.x, m_data.y, m_data.z);
|
||||
|
||||
respawn_timer.Disable();
|
||||
|
||||
|
||||
@ -1050,7 +1050,7 @@ int QuestParserCollection::DispatchEventSpell(QuestEventID evt, NPC* npc, Client
|
||||
|
||||
void QuestParserCollection::LoadPerlEventExportSettings(PerlEventExportSettings* perl_event_export_settings) {
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading Perl Event Export Settings...");
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading Perl Event Export Settings...");
|
||||
|
||||
/* Write Defaults First (All Enabled) */
|
||||
for (int i = 0; i < _LargestEventID; i++){
|
||||
|
||||
@ -191,7 +191,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
if (pack->size != sizeof(ServerConnectInfo))
|
||||
break;
|
||||
ServerConnectInfo* sci = (ServerConnectInfo*)pack->pBuffer;
|
||||
Log(Logs::Detail, Logs::Zone_Server, "World assigned Port: %d for this zone.", sci->port);
|
||||
Log(Logs::Detail, Logs::ZoneServer, "World assigned Port: %d for this zone.", sci->port);
|
||||
ZoneConfig::SetZonePort(sci->port);
|
||||
break;
|
||||
}
|
||||
@ -794,7 +794,7 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
}
|
||||
case ServerOP_SyncWorldTime: {
|
||||
if (zone != 0 && !zone->is_zone_time_localized) {
|
||||
Log(Logs::Moderate, Logs::Zone_Server, "%s Received Message SyncWorldTime", __FUNCTION__);
|
||||
Log(Logs::Moderate, Logs::ZoneServer, "%s Received Message SyncWorldTime", __FUNCTION__);
|
||||
|
||||
eqTimeOfDay* newtime = (eqTimeOfDay*)pack->pBuffer;
|
||||
zone->zone_time.SetCurrentEQTimeOfDay(newtime->start_eqtime, newtime->start_realtime);
|
||||
@ -816,12 +816,12 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
(eq_time.hour >= 13) ? "pm" : "am"
|
||||
);
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "Time Broadcast Packet: %s", time_message);
|
||||
Log(Logs::General, Logs::ZoneServer, "Time Broadcast Packet: %s", time_message);
|
||||
zone->SetZoneHasCurrentTime(true);
|
||||
|
||||
}
|
||||
if (zone && zone->is_zone_time_localized) {
|
||||
Log(Logs::General, Logs::Zone_Server, "Received request to sync time from world, but our time is localized currently");
|
||||
Log(Logs::General, Logs::ZoneServer, "Received request to sync time from world, but our time is localized currently");
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -1942,32 +1942,32 @@ void WorldServer::HandleMessage(uint16 opcode, const EQ::Net::Packet &p)
|
||||
case ServerOP_ChangeSharedMem:
|
||||
{
|
||||
std::string hotfix_name = std::string((char*)pack->pBuffer);
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading items");
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading items");
|
||||
if (!database.LoadItems(hotfix_name)) {
|
||||
Log(Logs::General, Logs::Error, "Loading items FAILED!");
|
||||
}
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading npc faction lists");
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading npc faction lists");
|
||||
if (!database.LoadNPCFactionLists(hotfix_name)) {
|
||||
Log(Logs::General, Logs::Error, "Loading npcs faction lists FAILED!");
|
||||
}
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading loot tables");
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading loot tables");
|
||||
if (!database.LoadLoot(hotfix_name)) {
|
||||
Log(Logs::General, Logs::Error, "Loading loot FAILED!");
|
||||
}
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading skill caps");
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading skill caps");
|
||||
if (!database.LoadSkillCaps(std::string(hotfix_name))) {
|
||||
Log(Logs::General, Logs::Error, "Loading skill caps FAILED!");
|
||||
}
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading spells");
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading spells");
|
||||
if (!database.LoadSpells(hotfix_name, &SPDAT_RECORDS, &spells)) {
|
||||
Log(Logs::General, Logs::Error, "Loading spells FAILED!");
|
||||
}
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "Loading base data");
|
||||
Log(Logs::General, Logs::ZoneServer, "Loading base data");
|
||||
if (!database.LoadBaseData(hotfix_name)) {
|
||||
Log(Logs::General, Logs::Error, "Loading base data FAILED!");
|
||||
}
|
||||
|
||||
@ -1459,10 +1459,10 @@ void Zone::StartShutdownTimer(uint32 set_time) {
|
||||
set_time = static_cast<uint32>(database.getZoneShutDownDelay(GetZoneID(), GetInstanceVersion()));
|
||||
}
|
||||
autoshutdown_timer.SetTimer(set_time);
|
||||
Log(Logs::General, Logs::Zone_Server, "Zone::StartShutdownTimer set to %u", set_time);
|
||||
Log(Logs::General, Logs::ZoneServer, "Zone::StartShutdownTimer set to %u", set_time);
|
||||
}
|
||||
|
||||
Log(Logs::Detail, Logs::Zone_Server,
|
||||
Log(Logs::Detail, Logs::ZoneServer,
|
||||
"Zone::StartShutdownTimer trigger - set_time: %u remaining_time: %u diff: %i",
|
||||
set_time,
|
||||
autoshutdown_timer.GetRemainingTime(),
|
||||
@ -1606,7 +1606,7 @@ void Zone::SetTime(uint8 hour, uint8 minute, bool update_world /*= true*/)
|
||||
|
||||
/* By Default we update worlds time, but we can optionally no update world which updates the rest of the zone servers */
|
||||
if (update_world){
|
||||
Log(Logs::General, Logs::Zone_Server, "Setting master time on world server to: %d:%d (%d)\n", hour, minute, (int)eq_time_of_day->start_realtime);
|
||||
Log(Logs::General, Logs::ZoneServer, "Setting master time on world server to: %d:%d (%d)\n", hour, minute, (int)eq_time_of_day->start_realtime);
|
||||
worldserver.SendPacket(pack);
|
||||
|
||||
/* Set Time Localization Flag */
|
||||
@ -1615,7 +1615,7 @@ void Zone::SetTime(uint8 hour, uint8 minute, bool update_world /*= true*/)
|
||||
/* When we don't update world, we are localizing ourselves, we become disjointed from normal syncs and set time locally */
|
||||
else{
|
||||
|
||||
Log(Logs::General, Logs::Zone_Server, "Setting zone localized time...");
|
||||
Log(Logs::General, Logs::ZoneServer, "Setting zone localized time...");
|
||||
|
||||
zone->zone_time.SetCurrentEQTimeOfDay(eq_time_of_day->start_eqtime, eq_time_of_day->start_realtime);
|
||||
auto outapp = new EQApplicationPacket(OP_TimeOfDay, sizeof(TimeOfDay_Struct));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user