Skip to content

Commit 13a4258

Browse files
authored
Allow customizing the staff relay host (#70)
* Update settingtypes.txt * Update init.lua
1 parent e76f8aa commit 13a4258

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

server_chat/init.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,11 @@ end
214214
-- Staff Channel
215215

216216
local ongoing = nil
217+
local host = core.settings:get("server_chat_discord_relay_host") or "127.0.0.1"
217218
local function grab_staff_messages()
218219
if not ongoing then
219220
ongoing = http.fetch_async({
220-
url = "localhost:31337",
221+
url = host .. ":31337",
221222
timeout = 10,
222223
method = "GET",
223224
})

server_chat/settingtypes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
server_chat_webhook (Webhook to send staff messages to) string ""
22
server_chat_relay_from_discord (Accept !st messages sent from ctf-discord-bot) bool false
3+
server_chat_discord_relay_host (Host that ctf-discord-bot is at) string "127.0.0.1"

0 commit comments

Comments
 (0)