diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index d11603f82da..86ecd93dba2 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -139,17 +139,11 @@ var/comms_password = "" - var/use_irc_bot = 0 - var/list/irc_bot_host = list() - var/main_irc = "" - var/admin_irc = "" - var/admin_notify_irc = "" - var/cidrandomizer_irc = "" - - var/use_discord_bot = 0 + var/use_discord_bot = FALSE var/discord_host = "" var/discord_channel_main = "" var/discord_channel_admin = "" + var/discord_channel_admin_notify = "" var/discord_channel_cidrandomizer = "" var/default_laws = 0 //Controls what laws the AI spawns with. @@ -463,9 +457,6 @@ if("allow_holidays") config.allow_holidays = 1 - if("use_irc_bot") - use_irc_bot = 1 - if("ticklag") Ticklag = text2num(value) @@ -509,23 +500,8 @@ if("comms_password") config.comms_password = value - if("irc_bot_host") - config.irc_bot_host = splittext(value, ";") - - if("main_irc") - config.main_irc = value - - if("admin_irc") - config.admin_irc = value - - if("admin_notify_irc") - config.admin_notify_irc = value - - if("cidrandomizer_irc") - config.cidrandomizer_irc = value - if("use_discord_bot") - use_discord_bot = 1 + use_discord_bot = TRUE if("discord_host") config.discord_host = value @@ -536,6 +512,9 @@ if("discord_channel_admin") config.discord_channel_admin = value + if("discord_channel_admin_notify") + config.discord_channel_admin_notify = value + if("discord_channel_cidrandomizer") config.discord_channel_cidrandomizer = value diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index cb5da26f0cd..e62a2a33f87 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -219,7 +219,7 @@ var/round_start_time = 0 var/list/admins_number = staff_countup(R_BAN) if(admins_number[1] == 0 && admins_number[3] == 0) - send2discord("message", config.discord_channel_admin, "Round has started with no admins online.") + send2discord("message", config.discord_channel_admin_notify, "Round has started with no admins online.") auto_toggle_ooc(0) // Turn it off round_start_time = world.time diff --git a/code/modules/ext_scripts/discord.dm b/code/modules/ext_scripts/discord.dm index f21158e506d..a68954776de 100644 --- a/code/modules/ext_scripts/discord.dm +++ b/code/modules/ext_scripts/discord.dm @@ -1,13 +1,13 @@ -/proc/send2discord(var/command, var/channel, var/message) +/proc/send2discord(command, channel, message) if (config.use_discord_bot && config.discord_host) world.Export("http://[config.discord_host]/?command=[command]&channel=[channel]&message=[paranoid_sanitize(message)]") -/proc/send2maindiscord(var/message) +/proc/send2maindiscord(message) if(config.discord_channel_main) send2discord("message", config.discord_channel_main, message) return -/proc/send2admindiscord(var/message) +/proc/send2admindiscord(message) if(config.discord_channel_admin) send2discord("message", config.discord_channel_admin, message) return diff --git a/config/example/config.txt b/config/example/config.txt index ba896f5448f..1eed03b2b4b 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -252,27 +252,9 @@ ALIEN_PLAYER_RATIO 0.2 ##Remove the # to let ghosts spin chairs GHOST_INTERACTION -## Password used for authorizing ircbot and other external tools. +## Password used for authorizing external tools. #COMMS_PASSWORD -## Uncomment to enable sending data to the IRC bot. -#USE_IRC_BOT - -## Host(s) where the IRC bot is hosted. Seperate IP's by ;. Port 45678 needs to be open. -#IRC_BOT_HOST 127.0.0.1;localhost - -## IRC channel to send information to. Leave blank to disable. -#MAIN_IRC #main - -## IRC channel to send adminhelps to. Leave blank to disable adminhelps-to-irc. -#ADMIN_IRC #admin - -## IRC channel to send direct messages to admins to. Leave blank to disable. -#ADMIN_NOTIFY_IRC #paradiseStaff - -## IRC channel to log CID randomizer blocker hits to. Leave blank to silence -#CIDRANDOMIZER_IRC #cidrandomizer - ## Uncomment to enable sending data to the Discord bot. #USE_DISCORD_BOT @@ -282,9 +264,12 @@ GHOST_INTERACTION ## Channel ID where the Bot should post its main notifications #DISCORD_CHANNEL_MAIN 0123456789 -## Channel ID where the Bot should post its admin notifications +## Channel ID where the Bot should post its admin messages #DISCORD_CHANNEL_ADMIN 0123456789 +## Channel ID where the Bot should post its admin notifications +#DISCORD_CHANNEL_ADMIN_NOTIFY 0123456789 + ## Channel ID where the bot should post its cidrandomizer notifications #DISCORD_CHANNEL_CIDRANDOMIZER 0123456789