mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 03:25:49 +01:00
Adds forum-based link config setting
This commit is contained in:
@@ -102,6 +102,7 @@
|
||||
var/donationsurl = "http://example.org"
|
||||
var/repositoryurl = "http://example.org"
|
||||
var/discordurl = "http://example.org"
|
||||
var/discordforumurl = "http://example.org"
|
||||
|
||||
var/overflow_server_url
|
||||
var/forbid_singulo_possession = 0
|
||||
@@ -487,6 +488,9 @@
|
||||
if("discordurl")
|
||||
config.discordurl = value
|
||||
|
||||
if("discordforumurl")
|
||||
config.discordforumurl = value
|
||||
|
||||
if("donationsurl")
|
||||
config.donationsurl = value
|
||||
|
||||
|
||||
@@ -240,6 +240,9 @@ CHECK_RANDOMIZER
|
||||
## Discord address
|
||||
# DISCORDURL http://example.org
|
||||
|
||||
## Discord address (forum-based invite)
|
||||
# DISCORDFORUMURL http://example.org
|
||||
|
||||
## Donations address
|
||||
# DONATIONSURL http://example.org
|
||||
|
||||
@@ -454,4 +457,4 @@ DISABLE_HIGH_POP_MC_MODE_AMOUNT 60
|
||||
#START_NOW_CONFIRMATION
|
||||
|
||||
## If uncommented, all gamemodes will respect the number of required players. Defaults to no.
|
||||
#ENABLE_GAMEMODE_PLAYER_LIMIT
|
||||
#ENABLE_GAMEMODE_PLAYER_LIMIT
|
||||
|
||||
@@ -81,12 +81,16 @@
|
||||
set name = "Discord"
|
||||
set desc = "Join our Discord server."
|
||||
set hidden = 1
|
||||
if(config.discordurl)
|
||||
if(alert("This will invite you to our Discord server. Are you sure?",,"Yes","No")=="No")
|
||||
return
|
||||
src << link(config.discordurl)
|
||||
else
|
||||
|
||||
var/durl = config.discordurl
|
||||
if(config.forum_link_url && prefs && prefs.fuid && config.discordforumurl)
|
||||
durl = config.discordforumurl
|
||||
if(!durl)
|
||||
to_chat(src, "<span class='danger'>The Discord URL is not set in the server configuration.</span>")
|
||||
return
|
||||
if(alert("This will invite you to our Discord server. Are you sure?",,"Yes","No")=="No")
|
||||
return
|
||||
src << link(durl)
|
||||
|
||||
/client/verb/donate()
|
||||
set name = "Donate"
|
||||
|
||||
Reference in New Issue
Block a user