• 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Release] MW3 Chat,Player,Kills Logging Suite
#1
Horrible name w/e. Point is to make administrating servers easier I made this plugin which logs the following to a MySQL Database:
  • Chat
  • Names
  • Players
  • Kills
  • Events

Detailed Info

Chat Logging

Quote:Records what a player says into chat or team chat. Can be told to ignore messages that are commands such as admin commands (e.g. !ban, !kick, !pl, etc). Records the XUID of the player, the Message, the exact date and time of the message and if it was a command or not. Strings are cleaned Smile

Name Logging

Quote:Records a player's name when they connect to the servers. Records the players' XUID, the name, the date and time they first connect with it. It will not add duplicate names and xuids (a.k.a. each xuid and name is unique, but if its the same name but different XUID it will log that.). Strings are cleaned Smile

Kill Logging

Quote:Records when a player kills them self, a teammate or an enemy. Records the attacker's XUID, the vicitim's XUID, the attacker's weapon, both the attacker and vicitim's positions (X,Y,Z) and the date and time the player was killed.

Event Logging

Quote:Logs when a player connects or disconnects from the server. Records their XUID, the date and time, and what they did (CONNECTED/DISCONNECTED).

Player Logging

Quote:Logs when a player joins. Keeps a list basically of all XUIDs that have connected.

I will be making a program that helps you easily find XUIDs, Names, Kills, Chat Messages, Connects/Disconnects once I see there is enough interest in the plug-in otherwise you can use MySQL Workbench to execute SQL Queries to find the data you need. This program will allow for filters to find the data you need that has been logged with the plug-in without having to know any SQL knowledge (other than having to install the database instance).

(Google it, its not too hard to do basic queries)


Requirements:
  • MW3 Dedicated Server w/ Server Addon (Steam) - No other versions (aka Tekno/4D1) will work
  • MySQL Server Instance 5.5/5.6 on the same box or a box that can take a lot of connections

MySQL Instance Requirements:
  • A schema set up, server default is fine, name can be anything you would like
  • Run the following MySQL Script with the above schema as the default schema (MYSQL SCRIPT FOR CREATING THE TABLES IS IN THE ATTACHED ZIP)
  • A user with proper permissions to access the above schema and tables (Root account works fine)
  • ***IF YOU DONT HAVE ANY OF THIS SEE THE INSTRUCTIONS BELOW!***

MySQL Instructions:
  • After you have installed a MySQL Instance (Skip if its installed or using a pre-installed one from a GSP)
  • Create a user (if not wanting to use 'root') and a password for that user (if you want of course)
  • Create a schema, name doesn't matter, but I suggest using something you'll recognize
  • Make the created schema the default schema
  • Load the SQL Script thats attached in the zip and then execute it (that lightning bolt)
  • Refresh the schema, make sure all 5 tables have been created
  • Move on to the plug in part

Plug-in Instructions:
  • Place the MW3_Suite.dll and the MySql.Data.Dll in to your /plugins folder

Modify your sv_config.ini by adding the following and by editing the correct connection info and any additional settings you would like changed
Code:
[MW3ATS]
// Host name of the MySQL Instance
// Usually an IP unless running on the same machine as the dedicated MW3 Server, if using localhost, you can use 127.0.0.1
hostname=myHost

// The Schema name from above, what ever you named it
database=myDB

// User that will be connecting to the instance
username=myUser

// Password for the user, if no password then leave as it is
password=myPass

// If you want it to print out in the MW3 Dedicated Server console if its successful, set to 1
LogDetailLevel=0

// If you want to see if any errors are occuring it will print to the MW3 Dedicated Server console
// 0 = None, 1 = Basic, 2 = Advanced
ErrorLevel=0

// Log to database when a player connects/disconnects. 0 = Off, 1 = On
LogEvents=1

// Log to database when a player chats. 0 = Off, 1 = On
LogChatMessages=1

// Log to database when a player kills another player. 0 = Off, 1 = On
LogKills=1

// Log to database all players (probably should just leave it as 1). 0 = Off, 1 = On
LogPlayers=1

// Log to database a players name. 0 = Off, 1 = On
// Recommended to prevent imposters causing havoc
LogNames=1

// Certain mods use commands that start with !,/,-,etc.
// If you want to record these into the database leave as 1 else 0 means they wont be logged
RecordCommands=1

//Primary Ignore String, can be more than 1 character but if a string starts with this then it will be seen as a command (such as admin commands)
IgnoreCharPri=!

//Secondary Ignore String, can be more than 1 character but if a string starts with this then it will be seen as a command (such as admin commands)
IgnoreCharSec=/

// Record all kills or just when a player kills enemy players
// 1 = All Kills, 0 = Just when players kill enemies only
AllKills=1

Versions:

0.2 [CURRENT VERSION]
- Minor bug fixes
- Included MySQL dll in rar
[attachment=2797]

Alt Mirror : http://rogue-fear.net/Files/MW3_Suite_0_2.rar

0.1 [No long supported]
- Initial Release
[attachment=2782]

Notes:
If you have problems please make a post with relevant info (MySQL Server Instance version, connection info (you can block out the host name and password when posting), MW3 Server Version and Server Addon Version.

Code:
If you want this plugin to record commands that another plugin hides from displaying in chat (aka ChatType.ChatNone) rename this (MW3_Suite.dll) plugin to where it precedes it in the loading order such as naming it (aMW_Suite.dll). How the ServerAddon loads plugins is alphabetically and that's also how it handles them. Make sure you don't change the extension!

Posting useless info (e.g. "Doesn't work" or such things) will be ignored!
  Reply
#2
Where is the .Dll ??Angry
  Reply
#3
Fixed I dont know why it wasn't on there.
  Reply
#4
Updated plugin
New version also includes MySql.Data.dll as its needed.
Changed LogPlayer and LogName command to ignore duplicate rows so it doesn't spam console with duplicate key errors.
If a Name and XUID together, in the names table already exists itll not insert a duplicate row or complain about duplicate row.
If a XUID is in the player table it will no longer complain about duplicate XUID and wont insert a duplicate row either.

So less console spam about errors that don't affect anything.

Everything should work correctly and no more errors about a missing MySQL.Data assembly should appear. Works fine with MySQL 5.5 and above. Runs fine on a MW3 Steam 1.9.461 with SA 1.413 Server.
  Reply
#5
.dll Seems to be missing again from the initial post.
  Reply
#6
www.itsmods.com/forum/attachment.php?aid=2797
  Reply
#7
@ EnVi: "The specified thread does not exist."
  Reply
#8
(11-26-2013, 20:30)Quarkclan Wrote: @ EnVi: "The specified thread does not exist."

I think its for an attachment.. but its not working.
~FYANB~ Servers Website

Primary Account:
[Image: 76561198070236721.png]
Secondary Account:
[Image: 76561198096107676.png]
Third Account:
[Image: 76561198164751656.png]
  Reply
#9
Added alternative mirror for the file as well. Dunno why its removed the attachment twice now.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Release] [BigBrotherBot] External Rcon 0.5/Chat viewer 0.2 beta archit 51 30,039 06-19-2014, 12:03
Last Post: lagos911

Forum Jump:


Users browsing this thread: 1 Guest(s)