mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 04:16:46 +00:00
At point in which Client -> Server packet logging is working, will do more prechecking to declare that anything actually is subscribed to this category before outputting
This commit is contained in:
@@ -404,6 +404,9 @@ int Client::HandlePacket(const EQApplicationPacket *app)
|
||||
Log.Out(Logs::Detail, Logs::Client_Server_Packet, "Dispatch opcode: %s", buffer);
|
||||
}
|
||||
|
||||
// std::cout << "[Client -> Server] " << StringFormat("[%s - 0x%04x] [Size: %u] \n %s", OpcodeManager::EmuToName(app->GetOpcode()), app->GetOpcode(), app->Size(), DumpPacketToString(app).c_str()) << std::endl;
|
||||
Log.Out(Logs::General, Logs::Client_Server_Packet, "[%s - 0x%04x] [Size: %u] \n %s", OpcodeManager::EmuToName(app->GetOpcode()), app->GetOpcode(), app->Size(), DumpPacketToString(app).c_str());
|
||||
|
||||
EmuOpcode opcode = app->GetOpcode();
|
||||
if (opcode == OP_AckPacket) {
|
||||
return true;
|
||||
|
||||
+13
-11
@@ -23,6 +23,7 @@
|
||||
#include "../common/rulesys.h"
|
||||
#include "../common/types.h"
|
||||
#include "../common/random.h"
|
||||
#include "../common/string_util.h"
|
||||
#include "qglobals.h"
|
||||
#include "spawn2.h"
|
||||
#include "spawngroup.h"
|
||||
@@ -67,16 +68,6 @@ struct item_tick_struct {
|
||||
std::string qglobal;
|
||||
};
|
||||
|
||||
// static uint32 gmsay_log_message_colors[EQEmuLogSys::MaxLogID] = {
|
||||
// 15, // "Status", - Yellow
|
||||
// 15, // "Normal", - Yellow
|
||||
// 3, // "Error", - Red
|
||||
// 14, // "Debug", - Light Green
|
||||
// 4, // "Quest",
|
||||
// 5, // "Command",
|
||||
// 3 // "Crash"
|
||||
// };
|
||||
|
||||
class Client;
|
||||
class Map;
|
||||
class Mob;
|
||||
@@ -266,7 +257,18 @@ public:
|
||||
// random object that provides random values for the zone
|
||||
EQEmu::Random random;
|
||||
|
||||
static void GMSayHookCallBackProcess(uint16 log_category, const std::string& message){ entity_list.MessageStatus(0, 80, Log.GetGMSayColorFromCategory(log_category), "%s", message.c_str()); }
|
||||
static void GMSayHookCallBackProcess(uint16 log_category, const std::string& message){
|
||||
if (message.find("\n") != std::string::npos){
|
||||
auto message_split = SplitString(message, '\n');
|
||||
entity_list.MessageStatus(0, 80, Log.GetGMSayColorFromCategory(log_category), "%s", message_split[0].c_str());
|
||||
for (size_t iter = 1; iter < message_split.size(); ++iter) {
|
||||
entity_list.MessageStatus(0, 80, Log.GetGMSayColorFromCategory(log_category), "--- %s", message_split[iter].c_str());
|
||||
}
|
||||
}
|
||||
else{
|
||||
entity_list.MessageStatus(0, 80, Log.GetGMSayColorFromCategory(log_category), "%s", message.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
//MODDING HOOKS
|
||||
void mod_init();
|
||||
|
||||
Reference in New Issue
Block a user