• Hey! Register here to create your account, engage with the community, and talk about what is new!

Add a "get text from url" block

AlignedCookie88

Active member
Overlord
Joined
Mar 17, 2022
Messages
49
Reaction score
7
it would be rlly useful to me and lots of other players to be able to get text data from a url to make stats systems and have extra variable storage. it would also be useful for communicating with advanced APIs.

to prevent ppl making online stores for plots, u would need to make it require overlord + an admin to approve you to use it. this way the player would be easy to montior, so they would only make a few bucks before being banned permanently. and they just spent $100 on overlord so they would be no point in creating a webstore.
 

Speeder323

Forum adept
Joined
Sep 17, 2020
Messages
166
Reaction score
31
Devs are really not a fan of any sort of "getting data from outside sources"
It's because whatever website you want to get text from might take a moment to respond,
so what if you're trying to access the variable that's supposed to have the text already but the response hasn't come back yet?
Sure, code could yield until the website responds, but that's janky and the response could simply not arrive ever, making your code halt.

This is not the only "excuse" but it's kinda a major problem that I see here.
 

AlignedCookie88

Active member
Overlord
Joined
Mar 17, 2022
Messages
49
Reaction score
7
You should also be able to set a maximum yeild time, and also check wether the variable is set before using it.
 

chadulous__

Well-known member
Overlord
Joined
Nov 6, 2021
Messages
76
Reaction score
13
You should also be able to set a maximum yeild time, and also check wether the variable is set before using it.
There should also be a website verification type thing, where you have a specific file/endpoint say '/dfCORS.txt' or '/allowedPlots.df.txt' that has a list of diamondfire plots that are allowed to view this endpoint, or '*' if allowed anywhere on diamondfire to prevent random people from rate-limiting APIs through diamondfire. In addition, If people know how to send web requests, they probably know how to make their own API.
 
Last edited:

CheaterTim

Active member
Overlord
Joined
Mar 11, 2022
Messages
42
Reaction score
9
you have a specific file/endpoint say '/dfCORS.txt' or '/allowedPlots.df.txt' that has a list of diamondfire plots that are allowed to view this endpoint, or '*' if allowed anywhere on diamondfire to prevent random people from rate-limiting APIs through diamondfire.
I don't get how this would affect rate limits since this would only work with your own apis anyways, and such filter could easily by bypassed by just not sending the request from df

btw. df includes the plot id and username of the owner in the user-agent header, although not for setmaptexture.
 
Top Bottom