From 4ad407e9b91b7c84298a5ef42d0ca3d449eb6be3 Mon Sep 17 00:00:00 2001 From: void* Date: Thu, 3 Jan 2019 23:31:54 +0100 Subject: [PATCH] Added hook for roundend to notify the discord bot that round has ended (TODO: add more information to that round, example: survivors, ghost, game mode) --- code/modules/ext_scripts/discord.dm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/modules/ext_scripts/discord.dm b/code/modules/ext_scripts/discord.dm index dca20b0e911..c365d5e9bd9 100644 --- a/code/modules/ext_scripts/discord.dm +++ b/code/modules/ext_scripts/discord.dm @@ -1,4 +1,9 @@ /hook/startup/proc/discordNotify() if (config.use_discord_bot && config.discord_host && config.discord_port) world.Export("http://[config.discord_host]:[config.discord_port]/?command=startup&name=[station_name()]&connect=[config.server?"[config.server]":"[world.address]:[world.port]"]") + return 1 + +/hook/roundend/proc/discordNotify() + if (config.use_discord_bot && config.discord_host && config.discord_port) + world.Export("http://[config.discord_host]:[config.discord_port]/?command=roundend") return 1 \ No newline at end of file