mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 20:11:04 +01:00
Implement "send_link" macro (#6767)
When to_chat gets converted to a proc, then the construct of to_chat(some, link(url)) will no longer work. Or will produce odd results. As a result, the send_link macro is now created. Replaced existent instances of the previous construct and added a simple grep check for this as well. It won't catch all, probably, but it'll catch the most common instances.
This commit is contained in:
@@ -194,9 +194,9 @@
|
||||
else if (alert("This will open the Github page in your browser. Are you sure?",, "Yes", "No") == "Yes")
|
||||
if (href_list["pr"])
|
||||
var/pr_link = "[config.githuburl]pull/[href_list["pr"]]"
|
||||
to_chat(src, link(pr_link))
|
||||
send_link(src, pr_link)
|
||||
else
|
||||
to_chat(src, link(config.githuburl))
|
||||
send_link(src, config.githuburl)
|
||||
|
||||
// Forum link from various panels.
|
||||
if ("forums")
|
||||
@@ -671,7 +671,7 @@
|
||||
log_debug("Unrecognized process_webint_link() call used. Route sent: '[route]'.")
|
||||
return
|
||||
|
||||
to_chat(src, link(linkURL))
|
||||
send_link(src, linkURL)
|
||||
return
|
||||
|
||||
/client/verb/show_greeting()
|
||||
|
||||
@@ -251,7 +251,7 @@ datum/preferences
|
||||
|
||||
if(href_list["preference"] == "open_whitelist_forum")
|
||||
if(config.forumurl)
|
||||
to_chat(user, link(config.forumurl))
|
||||
send_link(user, config.forumurl)
|
||||
else
|
||||
to_chat(user, "<span class='danger'>The forum URL is not set in the server configuration.</span>")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user