Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Feature Requests

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

Reply
 
Thread Tools Display Modes
  #1  
Old 04-09-2010, 09:43 AM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Question Record / Log Chat

Whats the best way to record chat in ooc and other channels? Some players get out of hand and push the limits when I'm at work IRL. Would be AWSOME if all public chat could get recorded into a database table with date/time stamp, player name, and msg, etc. Otherwise, what options do we currently have?
Reply With Quote
  #2  
Old 04-09-2010, 01:24 PM
Noport
Opcode Ninja
 
Join Date: Mar 2009
Location: San francisco
Posts: 426
Default

type /log on in chat window
Reply With Quote
  #3  
Old 04-09-2010, 02:03 PM
steve
Discordant
 
Join Date: Jan 2002
Posts: 305
Default

I believe he means server-side, without having to be logged in.
Reply With Quote
  #4  
Old 04-09-2010, 03:00 PM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Default

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.
Reply With Quote
  #5  
Old 04-09-2010, 07:32 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,450
Default

Quote:
Originally Posted by thepoetwarrior View Post
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.
Reply With Quote
  #6  
Old 04-09-2010, 09:35 PM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Default

Awsome, can't wait.
Reply With Quote
  #7  
Old 04-10-2010, 03:32 AM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,450
Default

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)
Reply With Quote
  #8  
Old 04-10-2010, 12:04 PM
thepoetwarrior
Discordant
 
Join Date: Aug 2007
Posts: 307
Default

Awsome! Your a life saver. I saved this to file already, and will try to use it on our new server hardware this weekend during the install / setup.

Thanks a ton!
Reply With Quote
  #9  
Old 04-10-2010, 01:02 PM
Lillu
Hill Giant
 
Join Date: Sep 2008
Posts: 204
Default

Thank you Secrets, very handy.
__________________
Reply With Quote
  #10  
Old 10-24-2011, 06:32 PM
bruise
Fire Beetle
 
Join Date: Oct 2011
Location: Greenwood, SC
Posts: 18
Default

I apologize for resurrecting an old thread but i was wondering, how would I run this? Thanks!
Reply With Quote
  #11  
Old 10-25-2011, 03:45 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

You have to manually edit the changes that Secrets posted into your source and compile it yourself. Keep in mind that this was posted a while back so the line numbers most likely don't match up exactly, but it isn't hard to figure out the correct places to make the changes with the current source.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #12  
Old 10-25-2011, 11:42 AM
bruise
Fire Beetle
 
Join Date: Oct 2011
Location: Greenwood, SC
Posts: 18
Default

Thanks for the quick response! I manually added everything and have rebooted my server but still I'm not seeing anything logged for chat. I have double and triple checked that everything is in the right place and the only thing I found different was where above it says:
Quote:
else if (!worldserver.SendChannelMessage(this, targetname, chan_num, 0, language, message))
Mine instead has target_name but i suspect that shouldn't make any difference for the logging. This may sound stupid but I'm not sure how to "compile" it after I editted the files. Thanks a bunch for your assistance!
Reply With Quote
  #13  
Old 10-25-2011, 12:11 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

wiki info on compiling: http://www.eqemulator.net/wiki/wikka.php?wakka=VS2008
__________________
The Realm
Reply With Quote
  #14  
Old 10-25-2011, 12:37 PM
bruise
Fire Beetle
 
Join Date: Oct 2011
Location: Greenwood, SC
Posts: 18
Default

Thanks, I found 'compile' by right clicking the 2 cpp files in VB Express and it said they compiled successfully but the logging still isn't showing at all. I tried rebooting the server pc as well. Should i compile everything over again like shown in the wiki link above? I have custom items/rules/etc on my server that i really can't lose so before I compile everything, will i lose anything in the process? I see a log type in c:\eqemu\logs called eqemu_chatchannels_***.log but there's nothing really in there except stating the log was started.

Thanks!
Reply With Quote
  #15  
Old 10-26-2011, 11:05 AM
revloc02c's Avatar
revloc02c
Hill Giant
 
Join Date: Aug 2010
Location: UT
Posts: 215
Default

I hope I am not belittling you by asking you about something you feel is obvious, but after you compiled did you copy the .exe files over to your server folder?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 06:34 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3