Adds forum-based link config setting

This commit is contained in:
Kyep
2019-11-13 20:41:28 -08:00
parent de7b8c52e7
commit db82363bfb
3 changed files with 17 additions and 6 deletions
+4
View File
@@ -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
+4 -1
View File
@@ -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
+9 -5
View File
@@ -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"