[MIRROR] url parsing for motd & player tips (#7453)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
Co-authored-by: CHOMPStation2 <chompsation2@gmail.com>
This commit is contained in:
CHOMPStation2
2023-12-20 17:51:21 -07:00
committed by GitHub
parent e3a4d6ad61
commit 8898050c23
2 changed files with 3 additions and 1 deletions

View File

@@ -29,6 +29,7 @@ var/obj/effect/lobby_image = new /obj/effect/lobby_image
/mob/new_player/Login()
update_Login_details() //handles setting lastKnownIP and computer_id for use by the ban systems as well as checking for multikeying
if(join_motd)
join_motd = GLOB.is_valid_url.Replace(join_motd,"<span class='linkify'>$1</span>")
to_chat(src, "<div class=\"motd\">[join_motd]</div>")
if(has_respawned)

View File

@@ -31,6 +31,7 @@ Controlled by the player_tips subsystem under code/controllers/subsystems/player
if(!M.key && !(M.key in HasReceived))
to_chat(M, SPAN_WARNING("You have periodic player tips enabled. You may turn them off at any time with the Toggle Receiving Player Tips verb in Preferences, or in character set up under the OOC tab!\n Player tips appear every 45-75 minutes."))
HasReceived.Add(M.key)
tip = GLOB.is_valid_url.Replace(tip,"<span class='linkify'>$1</span>")
to_chat(M, SPAN_NOTICE("[tip]"))
@@ -46,4 +47,4 @@ Controlled by the player_tips subsystem under code/controllers/subsystems/player
if(choice == "cancel")
return
var/static/datum/player_tips/player_tips = new
to_chat(src, SPAN_NOTICE("[player_tips.pick_tip(choice)]"))
to_chat(src, SPAN_NOTICE("[GLOB.is_valid_url.Replace(player_tips.pick_tip(choice),"<span class='linkify'>$1</span>")]"))