mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
- 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:
@@ -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
|
||||
Reference in New Issue
Block a user