|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
Development::Feature Requests Post suggestions/feature requests here. |

04-09-2010, 03:00 PM
|
Discordant
|
|
Join Date: Aug 2007
Posts: 307
|
|
Yes, server side, cause we have auto reboots and I want to be logged in 24/7 to record. I know /log works with client, but wanted to know if there is a way the source code can do it, either into a text file or into the database would be great.
|

04-09-2010, 07:32 PM
|
 |
Demi-God
|
|
Join Date: May 2007
Location: b
Posts: 1,449
|
|
Quote:
Originally Posted by thepoetwarrior
Yes, server side, cause we have auto reboots and I want to be logged in 24/7 to record. I know /log works with client, but wanted to know if there is a way the source code can do it, either into a text file or into the database would be great.
|
I'll see if I can work something up for you.
It would be pretty easy to just dump all the chat to their own logfile with the way the logfile system is set up.
|

04-09-2010, 09:35 PM
|
Discordant
|
|
Join Date: Aug 2007
Posts: 307
|
|
Awsome, can't wait.
|
 |
|
 |

04-10-2010, 03:32 AM
|
 |
Demi-God
|
|
Join Date: May 2007
Location: b
Posts: 1,449
|
|
I had finished this earlier, just forgot to post it.
It puts all chat into its own log file. If you need to disable it, you're gonna need to recompile and change the EQDEBUG flag for chat.
If that's just confusing for you, well, here's a diff that you can apply.
Keep in mind this doesn't guarantee the person on the other end has received the tell, this is just what gets sent to the server to be sent elsewhere (ie: to other clients.)
Code:
Index: common/debug.cpp
===================================================================
--- common/debug.cpp (revision 1367)
+++ common/debug.cpp (working copy)
@@ -28,8 +28,8 @@
static EQEMuLog realLogFile;
EQEMuLog *LogFile = &realLogFile;
-static const char* FileNames[EQEMuLog::MaxLogID] = { "logs/eqemu", "logs/eqemu", "logs/eqemu_error", "logs/eqemu_debug", "logs/eqemu_quest", "logs/eqemu_commands" };
-static const char* LogNames[EQEMuLog::MaxLogID] = { "Status", "Normal", "Error", "Debug", "Quest", "Command" };
+static const char* FileNames[EQEMuLog::MaxLogID] = { "logs/eqemu", "logs/eqemu", "logs/eqemu_error", "logs/eqemu_debug", "logs/eqemu_quest", "logs/eqemu_commands", "logs/eqemu_chat" };
+static const char* LogNames[EQEMuLog::MaxLogID] = { "Status", "Normal", "Error", "Debug", "Quest", "Command", "Chat" };
EQEMuLog::EQEMuLog() {
// MOpen = new Mutex;
@@ -54,6 +54,7 @@
pLogStatus[Error] = 2;
pLogStatus[Quest] = 2;
pLogStatus[Commands] = 1;
+ pLogStatus[Chat] = 1;
#endif
logFileValid = true;
}
Index: common/debug.h
===================================================================
--- common/debug.h (revision 1367)
+++ common/debug.h (working copy)
@@ -112,6 +112,7 @@
Debug,
Quest,
Commands,
+ Chat,
MaxLogID
};
Index: zone/client.cpp
===================================================================
--- zone/client.cpp (revision 1367)
+++ zone/client.cpp (working copy)
@@ -788,6 +788,7 @@
else if (!worldserver.SendChannelMessage(this, targetname, chan_num, GuildID(), language, message))
Message(0, "Error: World server disconnected");
break;
+ LogFile->write(EQEMuLog::Chat, "%s says to guild %i, %s", this->GetName(), GuildID(), message);
}
case 2: { // GroupChat
Raid* raid = entity_list.GetRaidByClient(this);
@@ -800,12 +801,14 @@
if(group != NULL) {
group->GroupMessage(this,language,lang_skill,(const char*) message);
}
+ LogFile->write(EQEMuLog::Chat, "%s says to group, %s", this->GetName(), message);
break;
}
case 15: { //raid say
Raid* raid = entity_list.GetRaidByClient(this);
if(raid){
raid->RaidSay((const char*) message, this);
+ LogFile->write(EQEMuLog::Chat, "%s says to raid, %s", this->GetName(), message);
}
break;
}
@@ -813,7 +816,7 @@
Mob *sender = this;
if (GetPet() && GetPet()->FindType(SE_VoiceGraft))
sender = GetPet();
-
+ LogFile->write(EQEMuLog::Chat, "%s shouts, %s", this->GetName(), message);
entity_list.ChannelMessage(sender, chan_num, language, lang_skill, message);
break;
}
@@ -842,7 +845,7 @@
return;
}
}
-
+ LogFile->write(EQEMuLog::Chat, "%s says to auction, %s", this->GetName(), message);
if (!worldserver.SendChannelMessage(this, 0, 4, 0, language, message))
Message(0, "Error: World server disconnected");
}
@@ -886,6 +889,8 @@
return;
}
}
+
+ LogFile->write(EQEMuLog::Chat, "%s says out of character, %s", this->GetName(), message);
if (!worldserver.SendChannelMessage(this, 0, 5, 0, language, message))
{
@@ -898,7 +903,7 @@
if (GetPet() && GetPet()->FindType(SE_VoiceGraft))
sender = GetPet();
-
+ LogFile->write(EQEMuLog::Chat, "%s says out of character, %s", this->GetName(), message);
entity_list.ChannelMessage(sender, chan_num, language, message);
}
break;
@@ -909,7 +914,9 @@
Message(0, "Error: Only GMs can use this channel");
else if (!worldserver.SendChannelMessage(this, targetname, chan_num, 0, language, message))
Message(0, "Error: World server disconnected");
+ LogFile->write(EQEMuLog::Chat, "%s BROADCASTS, %s", this->GetName(), message);
break;
+
}
case 7: { // Tell
if(!global_channel_timer.Check())
@@ -935,6 +942,8 @@
}
}
+ LogFile->write(EQEMuLog::Chat, "%s tells %s, %s", this->GetName(), targetname, message);
+
if(!worldserver.SendChannelMessage(this, targetname, chan_num, 0, language, message))
Message(0, "Error: World server disconnected");
break;
@@ -949,6 +958,7 @@
sender = GetPet();
printf("Message: %s\n",message);
+ LogFile->write(EQEMuLog::Chat, "%s says, %s", this->GetName(), message);
entity_list.ChannelMessage(sender, chan_num, language, lang_skill, message);
if (sender != this)
|
 |
|
 |
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 12:26 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |