mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2026-08-30 16:16:47 +01:00
Update preferences.dm
adds more link options
This commit is contained in:
@@ -3996,11 +3996,11 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
features["headshot_link"] = null
|
||||
return
|
||||
|
||||
var/static/link_regex = regex("https://i.gyazo.com|https://media.discordapp.net|https://cdn.discordapp.com|https://media.discordapp.net$|https://static1.e621.net") //Do not touch the damn duplicates.
|
||||
var/static/link_regex = regex("^(https?|ftp):\\/\\/\[^\\s\\/$.?#].\[^\\s]*$") //Do not touch the damn duplicates.
|
||||
var/static/end_regex = regex(".jpg|.jpg|.png|.jpeg|.jpeg") //Regex is terrible, don't touch the duplicate extensions
|
||||
|
||||
if(!findtext(usr_input, link_regex, 1, 29))
|
||||
to_chat(usr, span_warning("The link needs to be an unshortened Gyazo, E621, or Discordapp link!"))
|
||||
if(!findtext(usr_input, link_regex))
|
||||
to_chat(usr, span_warning("You need a valid link!"))
|
||||
return
|
||||
if(!findtext(usr_input, end_regex, -8))
|
||||
to_chat(usr, span_warning("You need either \".png\", \".jpg\", or \".jpeg\" in the link!"))
|
||||
|
||||
Reference in New Issue
Block a user