Download Chat Logging Mod

Defender

Member
This logs the players name next to their chat each time they type some thing in text..
Vary usful for admins, who want to know whats being texted in their server.
The chat log will be in a new folder named PlayerChatLog, in the live or public-test game folder, depending on where you stalled it..


//==============================================================================
// Chat Logging Mod, created by Defender
// Version 3-15-2013
// Add, $Host::ChatLogging = 1; to your config to enable
//==============================================================================

Download>>> http://tribalcombat.com/misc/chatLoggingMod.zip


Place the zip in the game folder you run your server from.
To install just place the chatLoggingMod.zip in your Legions Overdrive live or public-test/mods/autoexec

Add, $Host::ChatLogging = 1; to your config to enable



Or make a new scripts file named ChatLoggingMod.cs
Then copy and past this code below in it, and place the new ChatLoggingMod.cs in your mod folder, same as above.


Code:
//==============================================================================
// Chat Logging Mod, created by Defender
// Version 3-15-2013
// Add, $Host::ChatLogging = 1; to your config to enable
//==============================================================================
 
function chatMessageAll(%sendingCL, %msgString)
{
  if ((%msgString $= "") || spamAlert(%sendingCL))
      return;
 
  if(MuteList::isMuted(%sendingCL)) {
      chatMessageClient(%sendingCL, "", "You have been muted.", false);
      return;
  }
 
  %count = ClientGroup.getCount();
  for (%i = 0; %i < %count; %i++)
  {
      %recipientCL = ClientGroup.getObject(%i);
      chatMessageClient(%recipientCL, %sendingCL, %msgString, false);
  }
  // -----------------------------------------------------------------------------
  // Chat Logging Mod
  ChatLog(%sendingCL, %msgString, true);
}
 
// -----------------------------------------------------------------------------
// Chat Logging Mod
// -----------------------------------------------------------------------------
function ChatLog(%sendingCL, %msgString){
if($Host::ChatLogging)
%name = %sendingCL.playerInfo.name;
$ChatLog = %name SPC getsimtime() @ ": " @ stripchars(%msgString,"\cp\co\c6\c7\c8\c9");
export("$ChatLog", "PlayerChatLog/PlayerChatLog.cs", true);
}
// -----------------------------------------------------------------------------
 

Defender

Member
Bots use resources I would think, Does his IRC bot run on the server or over the internet?
This is basic game code, efficiant, simplest way to log a players chat, I would think.
The code for it is the same we modders used to log chat in the tribes2, admin mods for years.
 

WildFire

Warrior of Linux
If you have a server for legions, I'm pretty sure you can host a measly IRC bot on it too. Over the internet, come into #Empire.1. It's pretty awesome as it takes the legions ingame chat and the bot posts it in the IRC chat and vice versa.

You should talk to Xzanth on combining your ideas to be honest.
 

Defender

Member
You should talk to Xzanth on combining your ideas to be honest.

This is no new idea, the original few lines of code I used to make this came from the tribes2, tricon2 admin mod.
Bots sound interesting for advanced server admins.
This is a drop in option, don't need to be an expert to use it..
The code is basic, will not effect the server..
 
Top