Skip to content

Drop curl dependency, enhance info endpoint

Compare
Choose a tag to compare
@Xenthys Xenthys released this 22 Feb 16:56
· 18 commits to master since this release
e74cff9

String concatenation is no longer used where in-line variables can improve code readability and ease of use.
Constants are now all checked and given default values in case they're unset. Old checks have been removed.
An optional MAX_ITERATIONS constant has been added.

Calling the Discord webhook now relies on native PHP functions (fopen, specifically file_get_contents) instead of using a plethora of curl functions. This might be disabled on some cheap webhosts, but those usually don't have libcurl installed anyway.

The info endpoint now indicates the amount of max iterations (to everyone), gives a list of configured usernames along with the list of admins (to admins), and whether a Discord webhook is configured and can be used by checking if "allow_url_fopen" is enabled (to admins).