Skip to content

Commit

Permalink
Adds Imgbox to the headshot whitelist. (#1379)
Browse files Browse the repository at this point in the history
initial commit
  • Loading branch information
sergeirocks100 authored and StealsThePRs committed Mar 11, 2024
1 parent b561bfb commit b7742d5
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
maximum_value_length = MAX_MESSAGE_LEN
/// Assoc list of ckeys and their link, used to cut down on chat spam
var/list/stored_link = list()
<<<<<<< HEAD

Check failure on line 10 in modular_nova/master_files/code/modules/client/preferences/headshot.dm

View workflow job for this annotation

GitHub Actions / Run Linters

got '<<', expected one of: newline, '/', identifier
var/static/link_regex = regex("i.gyazo.com|media.discordapp.net|cdn.discordapp.com|files.byondhome.com")
=======
var/static/link_regex = regex("i.gyazo.com|files.byondhome.com|images2.imgbox.com")
>>>>>>> 2a0b7c7bacc (Adds Imgbox to the headshot whitelist. (#1379))
var/static/list/valid_extensions = list("jpg", "png", "jpeg") // Regex works fine, if you know how it works

/datum/preference/text/headshot/apply_to_human(mob/living/carbon/human/target, value, datum/preferences/preferences)
Expand Down Expand Up @@ -36,7 +40,11 @@

find_index = findtext(value, link_regex)
if(find_index != 9)
<<<<<<< HEAD
to_chat(usr, span_warning("The image must be hosted on one of the following sites: 'Gyazo, Discord, Byond'"))
=======
to_chat(usr, span_warning("The image must be hosted on one of the following sites: 'Gyazo, Byond, Imgbox'"))
>>>>>>> 2a0b7c7bacc (Adds Imgbox to the headshot whitelist. (#1379))
return

apply_headshot(value)
Expand Down

0 comments on commit b7742d5

Please sign in to comment.