- The IRC bot will now send a message to IRC when the only admin logs out of the server (so long as the game is running, so this does not happen in pregame, the setting up process or after the game finished)

- The IRC bot will now also send a message to IRC whenever a round starts with no admins online.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4039 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
baloh.matevz
2012-07-11 18:01:41 +00:00
parent ef493f3b51
commit ba5b55286f
2 changed files with 15 additions and 1 deletions

View File

@@ -124,6 +124,13 @@ var/global/datum/controller/gameticker/ticker
start_events() //handles random events and space dust.
var/admins_number = 0
for(var/client/C)
if(C.holder)
admins_number++
if(admins_number == 0)
send2irc("Server", "Round just started with no admins online!")
spawn() supply_ticker() // Added to kick-off the supply shuttle regenerating points -- TLE
//Start master_controller.process()

View File

@@ -1,8 +1,15 @@
/mob/Logout()
log_access("Logout: [key_name(src)]")
if (admins[src.ckey])
message_admins("Admin logout: [key_name(src)]")
if (ticker && ticker.current_state == GAME_STATE_PLAYING) //Only report this stuff if we are currently playing.
var/admins_number = 0
for(var/client/C)
if(C.holder)
admins_number++
message_admins("Admin logout: [key_name(src)]")
if(admins_number == 1) //Since this admin has not logged out yet, they are still counted, if the number of admins is 1 it means that after this one logs out, it will be 0.
send2irc("Server", "I have no admins online!")
..()
return 1