mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Implements hooks, an easier way to write code to be called at startup/roundstart/roundend.
Current hooks are "startup", "roundstart", and "roundend". Most stuff in world/New() has been moved over to the startup hook. Roundstart and roundend have no hooks yet. Removed the unused "newbanjob.dm" file and associated verbs/topics. Bumped RECOMMENDED_VERSION up to 501. Signed-off-by: Mloc-Argent <colmohici@gmail.com>
This commit is contained in:
@@ -4,11 +4,16 @@
|
||||
return
|
||||
|
||||
/proc/send2mainirc(var/msg)
|
||||
if(config.use_irc_bot && config.main_irc && config.irc_bot_host)
|
||||
ext_python("ircbot_message.py", "[config.comms_password] [config.irc_bot_host] [config.main_irc] [msg]")
|
||||
if(config.main_irc)
|
||||
send2irc(config.main_irc, msg)
|
||||
return
|
||||
|
||||
/proc/send2adminirc(var/msg)
|
||||
if(config.use_irc_bot && config.admin_irc && config.irc_bot_host)
|
||||
ext_python("ircbot_message.py", "[config.comms_password] [config.irc_bot_host] [config.admin_irc] [msg]")
|
||||
if(config.admin_irc)
|
||||
send2irc(config.admin_irc, msg)
|
||||
return
|
||||
|
||||
|
||||
/hook/startup/proc/ircNotify()
|
||||
send2mainirc("Server starting up on [config.server? "byond://[config.server]" : "byond://[world.address]:[world.port]"]")
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user