mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
Updates the wiki verb to be able to type, say 'wiki cult', and hopefully go to the cult page.
This commit is contained in:
@@ -95,6 +95,7 @@ var/list/gamemode_cache = list()
|
|||||||
var/banappeals
|
var/banappeals
|
||||||
var/wikiurl
|
var/wikiurl
|
||||||
var/forumurl
|
var/forumurl
|
||||||
|
var/rulesurl
|
||||||
|
|
||||||
//Alert level description
|
//Alert level description
|
||||||
var/alert_desc_green = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced."
|
var/alert_desc_green = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced."
|
||||||
@@ -388,6 +389,9 @@ var/list/gamemode_cache = list()
|
|||||||
if ("forumurl")
|
if ("forumurl")
|
||||||
config.forumurl = value
|
config.forumurl = value
|
||||||
|
|
||||||
|
if ("rulesurl")
|
||||||
|
config.rulesurl = value
|
||||||
|
|
||||||
if ("guest_jobban")
|
if ("guest_jobban")
|
||||||
config.guest_jobban = 1
|
config.guest_jobban = 1
|
||||||
|
|
||||||
|
|||||||
@@ -177,6 +177,9 @@ GUEST_BAN
|
|||||||
## Wiki address
|
## Wiki address
|
||||||
# WIKIURL http://example.com
|
# WIKIURL http://example.com
|
||||||
|
|
||||||
|
## Rules address - where the rules button sends you.
|
||||||
|
# RULESURL http://example.com
|
||||||
|
|
||||||
## Ban appeals URL - usually for a forum or wherever people should go to contact your admins.
|
## Ban appeals URL - usually for a forum or wherever people should go to contact your admins.
|
||||||
# BANAPPEALS http://example.com
|
# BANAPPEALS http://example.com
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
//Please use mob or src (not usr) in these procs. This way they can be called in the same fashion as procs.
|
//Please use mob or src (not usr) in these procs. This way they can be called in the same fashion as procs.
|
||||||
/client/verb/wiki()
|
/client/verb/wiki(query as text)
|
||||||
set name = "wiki"
|
set name = "wiki"
|
||||||
set desc = "Visit the wiki."
|
set desc = "Type what you want to know about. This will open the wiki on your web browser."
|
||||||
set hidden = 1
|
set category = "OOC"
|
||||||
if(config.wikiurl)
|
if(config.wikiurl)
|
||||||
if(alert("This will open the wiki in your browser. Are you sure?",,"Yes","No")=="No")
|
if(query)
|
||||||
return
|
var/output = config.wikiurl + "/index.php?title=Special%3ASearch&profile=default&search=" + query
|
||||||
|
src << link(output)
|
||||||
|
else
|
||||||
src << link(config.wikiurl)
|
src << link(config.wikiurl)
|
||||||
else
|
else
|
||||||
src << "\red The wiki URL is not set in the server configuration."
|
src << "<span class='danger'>The wiki URL is not set in the server configuration.</span>"
|
||||||
return
|
return
|
||||||
|
|
||||||
/client/verb/forum()
|
/client/verb/forum()
|
||||||
@@ -20,16 +22,21 @@
|
|||||||
return
|
return
|
||||||
src << link(config.forumurl)
|
src << link(config.forumurl)
|
||||||
else
|
else
|
||||||
src << "\red The forum URL is not set in the server configuration."
|
src << "<span class='danger'>The forum URL is not set in the server configuration.</span>"
|
||||||
return
|
return
|
||||||
|
|
||||||
#define RULES_FILE "config/rules.html"
|
|
||||||
/client/verb/rules()
|
/client/verb/rules()
|
||||||
set name = "Rules"
|
set name = "Rules"
|
||||||
set desc = "Show Server Rules."
|
set desc = "Show Server Rules."
|
||||||
set hidden = 1
|
set hidden = 1
|
||||||
src << browse(file(RULES_FILE), "window=rules;size=480x320")
|
|
||||||
#undef RULES_FILE
|
if(config.rulesurl)
|
||||||
|
if(alert("This will open the rules in your browser. Are you sure?",,"Yes","No")=="No")
|
||||||
|
return
|
||||||
|
src << link(config.rulesurl)
|
||||||
|
else
|
||||||
|
src << "<span class='danger'>The rules URL is not set in the server configuration.</span>"
|
||||||
|
return
|
||||||
|
|
||||||
/client/verb/hotkeys_help()
|
/client/verb/hotkeys_help()
|
||||||
set name = "hotkeys-help"
|
set name = "hotkeys-help"
|
||||||
|
|||||||
Reference in New Issue
Block a user