[SCRIPT] Player Logger
Posted: Tue Nov 12, 2013 2:03 am
This script will log every logon and disconnect to the server to find who is on between a time range or at a specific time. Useful for build servers or any other servers where someone did something wrong at a certain time and you need to find who was online. The command /findusers will return all of the players online paired with their ips during the interval you specify. The logs are also saved at server exit and loaded at server start. You must CTRL-C exit the server for the log to save at the end, however. I might also update it during the future to include who a player is logged in as if they're logged in (only at a specific point though. It cant work during intervals because people can login, leave, come back and login multiple times during a range)
/findusers 10:00:00 10:10:00
(jacksmack => 45.83.74.140) , (dan => 123.56.11.100) were logged on
Code: Select all
Here's an example (defaults to current, day, month, and year):#-------------------------------------------------------------------------------
# Name: Player Logger
# Purpose: Logs when players are on and off the server. Can find what
# players were on the server during a specific time interval by
# using /findusers timeinterval1 timeinterval2 day month year
# Each time interval should be in the form hour:minute:second
# If the intervals are the same it finds the users logged on at
# that point in time. If day, month, or year is left out it will
# use the current day, month, or year at the time the command is
# used. Logs are saved on disconnect to the file specified at the
# beginning of this script.
#
# WARNING: YOU MUST CTRL-C EXIT THE SERVER FOR THE LOG TO SAVE. IT
# WILL NOT SAVE IF YOU JUST EXIT THE WINDOW
#
# Author: Gamemaster77
#-------------------------------------------------------------------------------/findusers 10:00:00 10:10:00
(jacksmack => 45.83.74.140) , (dan => 123.56.11.100) were logged on