Merge pull request #2386 from Citadel-Station-13/revert-2368-revert-2346-upstream-merge-29813

The wiki button now asks what page you want to be taken to [Fixed Edition]
This commit is contained in:
LetterJay
2017-08-16 09:43:49 -05:00
committed by GitHub
+7 -5
View File
@@ -1,12 +1,14 @@
//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 desc = "Visit the wiki."
set desc = "Type what you want to know about. This will open the wiki in your web browser. Type nothing to go to the main page."
set hidden = 1
if(config.wikiurl)
if(alert("This will open the wiki in your browser. Are you sure?",,"Yes","No")=="No")
return
src << link(config.wikiurl)
if(query)
var/output = config.wikiurl + "/index.php?title=Special%3ASearch&profile=default&search=" + query
src << link(output)
else if (query != null)
src << link(config.wikiurl)
else
to_chat(src, "<span class='danger'>The wiki URL is not set in the server configuration.</span>")
return