Permalink
Browse files

access.fifo support (reports login/logout events)

TODO: handle " has logged out of the server" reports
  • Loading branch information...
1 parent d29db89 commit 5b00e9922c957c5dff7b0f5615b8a2503abe7027 @dopeghoti dopeghoti committed Jun 14, 2012
Showing with 9 additions and 1 deletion.
  1. +4 −0 code/datum/configuration.dm
  2. +2 −0 code/modules/mob/login.dm
  3. +2 −1 code/modules/mob/logout.dm
  4. +1 −0 config/config.txt
@@ -64,6 +64,7 @@
// FIFO pipe definitions
var/fifo_adminhelp = null
+ var/fifo_access = null
//game_options.txt configs
@@ -308,6 +309,9 @@
if("fifo_adminhelp")
config.fifo_adminhelp = value
+ if("fifo_access")
+ config.fifo_access = value
+
else
diary << "Unknown setting in configuration: '[name]'"
@@ -1,5 +1,7 @@
/mob/Login()
log_access("Login: [key_name(src)] from [src.client.address ? src.client.address : "localhost"]")
+
+ text2file( "[src.key]: has logged into the server.", config.fifo_access )
src.lastKnownIP = src.client.address
src.computer_id = src.client.computer_id
if (config.log_access)
@@ -3,7 +3,8 @@
if (admins[src.ckey])
message_admins("Admin logout: [key_name(src)]")
src.logged_in = 0
+ text2file( "[src.key]: has logged out of the server.", config.fifo_access )
..()
- return 1
+ return 1
View
@@ -137,6 +137,7 @@ GUEST_JOBBAN 1
## FIFO Pipes
# These are used to transmit data out of the game to other processed. See doc/log_streams.txt
FIFO_ADMINHELP spool/adminhelp.fifo
+FIFO_ACCESS spool/access.fifo
## Remove the # to show a popup 'reply to' window to every non-admin that recieves an adminPM.
## The intention is to make adminPMs more visible. (although I fnd popups annoying so this defaults to off)

0 comments on commit 5b00e99

Please sign in to comment.