Rename reference logger to Log

This commit is contained in:
Akkadius
2015-01-18 00:41:18 -06:00
parent 126eca2ad6
commit 7dbde36b03
119 changed files with 2775 additions and 2775 deletions
+39 -39
View File
@@ -236,7 +236,7 @@ std::vector<std::string> ParseRecipients(std::string RecipientString) {
static void ProcessMailTo(Client *c, std::string MailMessage) {
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "MAILTO: From %s, %s", c->MailBoxName().c_str(), MailMessage.c_str());
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "MAILTO: From %s, %s", c->MailBoxName().c_str(), MailMessage.c_str());
std::vector<std::string> Recipients;
@@ -305,7 +305,7 @@ static void ProcessMailTo(Client *c, std::string MailMessage) {
if (!database.SendMail(Recipient, c->MailBoxName(), Subject, Body, RecipientsString)) {
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Failed in SendMail(%s, %s, %s, %s)", Recipient.c_str(),
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "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();
@@ -400,7 +400,7 @@ static void ProcessSetMessageStatus(std::string SetMessageCommand) {
static void ProcessCommandBuddy(Client *c, std::string Buddy) {
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Received buddy command with parameters %s", Buddy.c_str());
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Received buddy command with parameters %s", Buddy.c_str());
c->GeneralChannelMessage("Buddy list modified");
uint8 SubAction = 1;
@@ -430,7 +430,7 @@ static void ProcessCommandBuddy(Client *c, std::string Buddy) {
static void ProcessCommandIgnore(Client *c, std::string Ignoree) {
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Received ignore command with parameters %s", Ignoree.c_str());
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Received ignore command with parameters %s", Ignoree.c_str());
c->GeneralChannelMessage("Ignore list modified");
uint8 SubAction = 0;
@@ -481,9 +481,9 @@ Clientlist::Clientlist(int ChatPort) {
exit(1);
if (chatsf->Open())
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server,"Client (UDP) Chat listener started on port %i.", ChatPort);
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server,"Client (UDP) Chat listener started on port %i.", ChatPort);
else {
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server,"Failed to start client (UDP) listener (port %-4i)", ChatPort);
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server,"Failed to start client (UDP) listener (port %-4i)", ChatPort);
exit(1);
}
@@ -560,13 +560,13 @@ void Clientlist::CheckForStaleConnections(Client *c) {
if(((*Iterator) != c) && ((c->GetName() == (*Iterator)->GetName())
&& (c->GetConnectionType() == (*Iterator)->GetConnectionType()))) {
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Removing old connection for %s", c->GetName().c_str());
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Removing old connection for %s", c->GetName().c_str());
struct in_addr in;
in.s_addr = (*Iterator)->ClientStream->GetRemoteIP();
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Client connection from %s:%d closed.", inet_ntoa(in),
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Client connection from %s:%d closed.", inet_ntoa(in),
ntohs((*Iterator)->ClientStream->GetRemotePort()));
safe_delete((*Iterator));
@@ -586,7 +586,7 @@ void Clientlist::Process() {
in.s_addr = eqs->GetRemoteIP();
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "New Client UDP connection from %s:%d", inet_ntoa(in), ntohs(eqs->GetRemotePort()));
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "New Client UDP connection from %s:%d", inet_ntoa(in), ntohs(eqs->GetRemotePort()));
eqs->SetOpcodeManager(&ChatOpMgr);
@@ -606,7 +606,7 @@ void Clientlist::Process() {
in.s_addr = (*Iterator)->ClientStream->GetRemoteIP();
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Client connection from %s:%d closed.", inet_ntoa(in),
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Client connection from %s:%d closed.", inet_ntoa(in),
ntohs((*Iterator)->ClientStream->GetRemotePort()));
safe_delete((*Iterator));
@@ -646,7 +646,7 @@ void Clientlist::Process() {
if(strlen(PacketBuffer) != 9)
{
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Mail key is the wrong size. Version of world incompatible with UCS.");
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Mail key is the wrong size. Version of world incompatible with UCS.");
KeyValid = false;
break;
}
@@ -667,11 +667,11 @@ void Clientlist::Process() {
else
CharacterName = MailBoxString.substr(LastPeriod + 1);
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Received login for user %s with key %s", MailBox, Key);
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Received login for user %s with key %s", MailBox, Key);
if(!database.VerifyMailKey(CharacterName, (*Iterator)->ClientStream->GetRemoteIP(), Key)) {
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Chat Key for %s does not match, closing connection.", MailBox);
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Chat Key for %s does not match, closing connection.", MailBox);
KeyValid = false;
@@ -703,7 +703,7 @@ void Clientlist::Process() {
default: {
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Unhandled chat opcode %8X", opcode);
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Unhandled chat opcode %8X", opcode);
break;
}
}
@@ -716,7 +716,7 @@ void Clientlist::Process() {
in.s_addr = (*Iterator)->ClientStream->GetRemoteIP();
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Force disconnecting client: %s:%d, KeyValid=%i, GetForceDisconnect()=%i",
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Force disconnecting client: %s:%d, KeyValid=%i, GetForceDisconnect()=%i",
inet_ntoa(in), ntohs((*Iterator)->ClientStream->GetRemotePort()),
KeyValid, (*Iterator)->GetForceDisconnect());
@@ -860,7 +860,7 @@ void Clientlist::ProcessOPMailCommand(Client *c, std::string CommandString)
break;
case CommandSetMessageStatus:
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Set Message Status, Params: %s", Parameters.c_str());
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Set Message Status, Params: %s", Parameters.c_str());
ProcessSetMessageStatus(Parameters);
break;
@@ -885,7 +885,7 @@ void Clientlist::ProcessOPMailCommand(Client *c, std::string CommandString)
default:
c->SendHelp();
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Unhandled OP_Mail command: %s", CommandString.c_str());
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Unhandled OP_Mail command: %s", CommandString.c_str());
}
}
@@ -896,7 +896,7 @@ void Clientlist::CloseAllConnections() {
for(Iterator = ClientChatConnections.begin(); Iterator != ClientChatConnections.end(); ++Iterator) {
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Removing client %s", (*Iterator)->GetName().c_str());
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Removing client %s", (*Iterator)->GetName().c_str());
(*Iterator)->CloseConnection();
}
@@ -905,7 +905,7 @@ void Clientlist::CloseAllConnections() {
void Client::AddCharacter(int CharID, const char *CharacterName, int Level) {
if(!CharacterName) return;
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Adding character %s with ID %i for %s", CharacterName, CharID, GetName().c_str());
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Adding character %s with ID %i for %s", CharacterName, CharID, GetName().c_str());
CharacterEntry NewCharacter;
NewCharacter.CharID = CharID;
NewCharacter.Name = CharacterName;
@@ -971,7 +971,7 @@ void Client::AddToChannelList(ChatChannel *JoinedChannel) {
for(int i = 0; i < MAX_JOINED_CHANNELS; i++)
if(JoinedChannels[i] == nullptr) {
JoinedChannels[i] = JoinedChannel;
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Added Channel %s to slot %i for %s", JoinedChannel->GetName().c_str(), i + 1, GetName().c_str());
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Added Channel %s to slot %i for %s", JoinedChannel->GetName().c_str(), i + 1, GetName().c_str());
return;
}
}
@@ -1012,7 +1012,7 @@ void Client::JoinChannels(std::string ChannelNameList) {
}
}
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Client: %s joining channels %s", GetName().c_str(), ChannelNameList.c_str());
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Client: %s joining channels %s", GetName().c_str(), ChannelNameList.c_str());
int NumberOfChannels = ChannelCount();
@@ -1113,7 +1113,7 @@ void Client::JoinChannels(std::string ChannelNameList) {
void Client::LeaveChannels(std::string ChannelNameList) {
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Client: %s leaving channels %s", GetName().c_str(), ChannelNameList.c_str());
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Client: %s leaving channels %s", GetName().c_str(), ChannelNameList.c_str());
std::string::size_type CurrentPos = 0;
@@ -1292,7 +1292,7 @@ void Client::SendChannelMessage(std::string Message)
std::string ChannelName = Message.substr(1, MessageStart-1);
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "%s tells %s, [%s]", GetName().c_str(), ChannelName.c_str(), Message.substr(MessageStart + 1).c_str());
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "%s tells %s, [%s]", GetName().c_str(), ChannelName.c_str(), Message.substr(MessageStart + 1).c_str());
ChatChannel *RequiredChannel = ChannelList->FindChannel(ChannelName);
@@ -1435,7 +1435,7 @@ void Client::SendChannelMessageByNumber(std::string Message) {
}
}
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "%s tells %s, [%s]", GetName().c_str(), RequiredChannel->GetName().c_str(),
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "%s tells %s, [%s]", GetName().c_str(), RequiredChannel->GetName().c_str(),
Message.substr(MessageStart + 1).c_str());
if(RuleB(Chat, EnableAntiSpam))
@@ -1647,7 +1647,7 @@ void Client::SetChannelPassword(std::string ChannelPassword) {
else
Message = "Password change on channel " + ChannelName;
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Set password of channel [%s] to [%s] by %s", ChannelName.c_str(), Password.c_str(), GetName().c_str());
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Set password of channel [%s] to [%s] by %s", ChannelName.c_str(), Password.c_str(), GetName().c_str());
ChatChannel *RequiredChannel = ChannelList->FindChannel(ChannelName);
@@ -1702,7 +1702,7 @@ void Client::SetChannelOwner(std::string CommandString) {
if((ChannelName.length() > 0) && isdigit(ChannelName[0]))
ChannelName = ChannelSlotName(atoi(ChannelName.c_str()));
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Set owner of channel [%s] to [%s]", ChannelName.c_str(), NewOwner.c_str());
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Set owner of channel [%s] to [%s]", ChannelName.c_str(), NewOwner.c_str());
ChatChannel *RequiredChannel = ChannelList->FindChannel(ChannelName);
@@ -1790,7 +1790,7 @@ void Client::ChannelInvite(std::string CommandString) {
if((ChannelName.length() > 0) && isdigit(ChannelName[0]))
ChannelName = ChannelSlotName(atoi(ChannelName.c_str()));
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "[%s] invites [%s] to channel [%s]", GetName().c_str(), Invitee.c_str(), ChannelName.c_str());
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "[%s] invites [%s] to channel [%s]", GetName().c_str(), Invitee.c_str(), ChannelName.c_str());
Client *RequiredClient = CL->FindCharacter(Invitee);
@@ -1918,7 +1918,7 @@ void Client::ChannelGrantModerator(std::string CommandString) {
if((ChannelName.length() > 0) && isdigit(ChannelName[0]))
ChannelName = ChannelSlotName(atoi(ChannelName.c_str()));
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "[%s] gives [%s] moderator rights to channel [%s]", GetName().c_str(), Moderator.c_str(), ChannelName.c_str());
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "[%s] gives [%s] moderator rights to channel [%s]", GetName().c_str(), Moderator.c_str(), ChannelName.c_str());
Client *RequiredClient = CL->FindCharacter(Moderator);
@@ -1999,7 +1999,7 @@ void Client::ChannelGrantVoice(std::string CommandString) {
if((ChannelName.length() > 0) && isdigit(ChannelName[0]))
ChannelName = ChannelSlotName(atoi(ChannelName.c_str()));
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "[%s] gives [%s] voice to channel [%s]", GetName().c_str(), Voicee.c_str(), ChannelName.c_str());
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "[%s] gives [%s] voice to channel [%s]", GetName().c_str(), Voicee.c_str(), ChannelName.c_str());
Client *RequiredClient = CL->FindCharacter(Voicee);
@@ -2087,7 +2087,7 @@ void Client::ChannelKick(std::string CommandString) {
if((ChannelName.length() > 0) && isdigit(ChannelName[0]))
ChannelName = ChannelSlotName(atoi(ChannelName.c_str()));
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "[%s] kicks [%s] from channel [%s]", GetName().c_str(), Kickee.c_str(), ChannelName.c_str());
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "[%s] kicks [%s] from channel [%s]", GetName().c_str(), Kickee.c_str(), ChannelName.c_str());
Client *RequiredClient = CL->FindCharacter(Kickee);
@@ -2196,32 +2196,32 @@ void Client::SetConnectionType(char c) {
case 'S':
{
TypeOfConnection = ConnectionTypeCombined;
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Connection type is Combined (SoF/SoD)");
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Connection type is Combined (SoF/SoD)");
break;
}
case 'U':
{
TypeOfConnection = ConnectionTypeCombined;
UnderfootOrLater = true;
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Connection type is Combined (Underfoot+)");
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Connection type is Combined (Underfoot+)");
break;
}
case 'M':
{
TypeOfConnection = ConnectionTypeMail;
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Connection type is Mail (6.2 or Titanium client)");
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Connection type is Mail (6.2 or Titanium client)");
break;
}
case 'C':
{
TypeOfConnection = ConnectionTypeChat;
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Connection type is Chat (6.2 or Titanium client)");
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Connection type is Chat (6.2 or Titanium client)");
break;
}
default:
{
TypeOfConnection = ConnectionTypeUnknown;
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Connection type is unknown.");
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "Connection type is unknown.");
}
}
}
@@ -2299,11 +2299,11 @@ void Client::SendNotification(int MailBoxNumber, std::string Subject, std::strin
void Client::ChangeMailBox(int NewMailBox) {
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "%s Change to mailbox %i", MailBoxName().c_str(), NewMailBox);
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "%s Change to mailbox %i", MailBoxName().c_str(), NewMailBox);
SetMailBox(NewMailBox);
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "New mailbox is %s", MailBoxName().c_str());
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "New mailbox is %s", MailBoxName().c_str());
auto outapp = new EQApplicationPacket(OP_MailboxChange, 2);
@@ -2377,13 +2377,13 @@ std::string Client::MailBoxName() {
if((Characters.size() == 0) || (CurrentMailBox > (Characters.size() - 1)))
{
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "MailBoxName() called with CurrentMailBox set to %i and Characters.size() is %i",
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "MailBoxName() called with CurrentMailBox set to %i and Characters.size() is %i",
CurrentMailBox, Characters.size());
return "";
}
logger.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "MailBoxName() called with CurrentMailBox set to %i and Characters.size() is %i",
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::UCS_Server, "MailBoxName() called with CurrentMailBox set to %i and Characters.size() is %i",
CurrentMailBox, Characters.size());
return Characters[CurrentMailBox].Name;