Keep chatlogs ?

05/09/2010 19:02 MonstersAbroad#1
Hello elitepvper's me again,

Is there a way to keep chatlogs of every single player becuase I know a few 5065 server did that to moniter there GM's and players ? any help ?
05/09/2010 20:16 -impulse-#2
Quote:
Originally Posted by MonstersAbroad View Post
Hello elitepvper's me again,

Is there a way to keep chatlogs of every single player becuase I know a few 5065 server did that to moniter there GM's and players ? any help ?
Yes it is. Pwnquer source has something like this implented. However is not hard at all.
Just tell me what source you use and I'll try to give a hand.
05/09/2010 20:32 pintser#3
5165
05/09/2010 22:03 LetterX#4
All you'd need to do is make like a void in the database

like

Code:
 public static void ChatLogs(string From, string To, string Message)
{
  Implement it in your Ini Database maybe in a folder like /ChatLogs/...
  IniFile Ini = new IniFile(DatabaseFolder + "\\ChatLogs\\"+From+"\\"+ Include like the Date...+".ini");
  Ini.Write( blah, From, "blah");
  Ini.Write( blah, To, "Blah");
  Ini.Write(  blah, Message, "blah");
  
}
and then, in PacketProcessor or whatever it's called, for the Message Packet, you add in the ChatLogs void, like "Database.ChatLogs(From, To, Msg);" or if you want only GMs/PMs to be recorded, you'd add in an if statement, like
Code:
if (PlayerFlag >= 2)
{
Database.ChatLogs(From, To, Msg);
}
edit: This isn't source-specific...just to show an example of how simple this is to implement/create.