mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 11:05:03 +01:00
URL configuration
This commit is contained in:
+21
-15
@@ -3,12 +3,12 @@
|
||||
set name = "wiki"
|
||||
set desc = "Type what you want to know about. This will open the wiki in your web browser."
|
||||
set hidden = 1
|
||||
if(config.wikiurl)
|
||||
if(GLOB?.configuration?.url.wiki_url)
|
||||
var/query = stripped_input(src, "Enter Search:", "Wiki Search", "Homepage")
|
||||
if(query == "Homepage")
|
||||
src << link(config.wikiurl)
|
||||
src << link(GLOB.configuration.url.wiki_url)
|
||||
else if(query)
|
||||
var/output = config.wikiurl + "/index.php?title=Special%3ASearch&profile=default&search=" + query
|
||||
var/output = "[GLOB.configuration.url.wiki_url]/index.php?title=Special%3ASearch&profile=default&search=[query]"
|
||||
src << link(output)
|
||||
else
|
||||
to_chat(src, "<span class='danger'>The wiki URL is not set in the server configuration.</span>")
|
||||
@@ -18,11 +18,11 @@
|
||||
set name = "forum"
|
||||
set desc = "Visit the forum."
|
||||
set hidden = 1
|
||||
if(config.forumurl)
|
||||
if(GLOB?.configuration?.url.forum_url)
|
||||
if(alert("Open the forum in your browser?", null, "Yes", "No") == "Yes")
|
||||
if(config.forum_link_url && prefs && !prefs.fuid)
|
||||
if(GLOB?.configuration?.url.forum_link_url && prefs && !prefs.fuid)
|
||||
link_forum_account()
|
||||
src << link(config.forumurl)
|
||||
src << link(GLOB.configuration.url.forum_url)
|
||||
else
|
||||
to_chat(src, "<span class='danger'>The forum URL is not set in the server configuration.</span>")
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
set name = "Rules"
|
||||
set desc = "View the server rules."
|
||||
set hidden = 1
|
||||
if(config.rulesurl)
|
||||
if(GLOB?.configuration?.url.rules_url)
|
||||
if(alert("This will open the rules in your browser. Are you sure?", null, "Yes", "No") == "No")
|
||||
return
|
||||
src << link(config.rulesurl)
|
||||
src << link(GLOB.configuration.url.rules_url)
|
||||
else
|
||||
to_chat(src, "<span class='danger'>The rules URL is not set in the server configuration.</span>")
|
||||
|
||||
@@ -41,10 +41,10 @@
|
||||
set name = "GitHub"
|
||||
set desc = "Visit the GitHub page."
|
||||
set hidden = 1
|
||||
if(config.githuburl)
|
||||
if(GLOB?.configuration?.url.github_url)
|
||||
if(alert("This will open our GitHub repository in your browser. Are you sure?", null, "Yes", "No") == "No")
|
||||
return
|
||||
src << link(config.githuburl)
|
||||
src << link(GLOB.configuration.url.github_url)
|
||||
else
|
||||
to_chat(src, "<span class='danger'>The GitHub URL is not set in the server configuration.</span>")
|
||||
|
||||
@@ -53,9 +53,15 @@
|
||||
set desc = "Join our Discord server."
|
||||
set hidden = 1
|
||||
|
||||
var/durl = config.discordurl
|
||||
if(config.forum_link_url && prefs && prefs.fuid && config.discordforumurl)
|
||||
durl = config.discordforumurl
|
||||
var/durl
|
||||
// Use normal URL
|
||||
if(GLOB?.configuration?.url.discord_url)
|
||||
durl = GLOB.configuration.url.discord_url
|
||||
|
||||
// Use forums URL if set
|
||||
if(GLOB?.configuration?.url.forum_link_url && GLOB?.configuration?.url.discord_forum_url && prefs?.fuid)
|
||||
durl = GLOB.configuration.url.discord_forum_url
|
||||
|
||||
if(!durl)
|
||||
to_chat(src, "<span class='danger'>The Discord URL is not set in the server configuration.</span>")
|
||||
return
|
||||
@@ -67,10 +73,10 @@
|
||||
set name = "Donate"
|
||||
set desc = "Donate to help with hosting costs."
|
||||
set hidden = 1
|
||||
if(config.donationsurl)
|
||||
if(GLOB?.configuration?.url.donations_url)
|
||||
if(alert("This will open the donation page in your browser. Are you sure?", null, "Yes", "No") == "No")
|
||||
return
|
||||
src << link(config.donationsurl)
|
||||
src << link(GLOB.configuration.url.donations_url)
|
||||
else
|
||||
to_chat(src, "<span class='danger'>The rules URL is not set in the server configuration.</span>")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user