Updated the linkage between the NanoTrasen IRC bot and the server.

- Server will now send adminhelps to the admin channel, with information if there is no admins online.
- Server will inform the admin channel if the last admin online logs out.
- When a round ends, the server will alert the main channel, supplying some statistics.
Additionally, laid the groundwork for an external scripts system.
This is fully configurable/togglable in the config.txt file.

Signed-off-by: Mloc-Argent <colmohici@gmail.com>
This commit is contained in:
Mloc-Argent
2013-07-02 23:41:40 +01:00
parent 12a79e4ade
commit cf4bd39f6e
11 changed files with 100 additions and 35 deletions

View File

@@ -106,15 +106,10 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
log_admin("HELP: [key_name(src)]: [original_msg] - heard by [admin_number_present] non-AFK admins.")
if(admin_number_present <= 0)
if(!admin_number_afk)
send2irc(ckey, "[original_msg] - No admins online")
send2adminirc("ADMINHELP from [key_name(src)]: [original_msg] - !!No admins online!!")
else
send2irc(ckey, "[original_msg] - All admins AFK ([admin_number_afk])")
send2adminirc("ADMINHELP from [key_name(src)]: [original_msg] - !!All admins AFK ([admin_number_afk])!!")
else
send2irc(ckey, original_msg)
send2adminirc("ADMINHELP from [key_name(src)]: [original_msg]")
feedback_add_details("admin_verb","AH") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
proc/send2irc(msg,msg2)
if(config.useircbot)
shell("python [config.nudge_script_path] [msg] [msg2]")
return