Skip to content

Commit

Permalink
Merge pull request #2 from Absolucy/plexora-bot-pr
Browse files Browse the repository at this point in the history
meow
  • Loading branch information
flleeppyy authored Sep 5, 2024
2 parents c570713 + 25844dc commit b561cca
Show file tree
Hide file tree
Showing 6 changed files with 285 additions and 305 deletions.
7 changes: 7 additions & 0 deletions code/__DEFINES/~monkestation/helpers.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/// Until a condition is true, sleep, or until a certain amount of time has passed.
/// Basically, UNTIL() but with a timeout.
#define UNTIL_OR_TIMEOUT(Condition, Timeout) \
do { \
var/__end_time = REALTIMEOFDAY + (Timeout); \
UNTIL((Condition) || (REALTIMEOFDAY > __end_time)); \
} while(0)
5 changes: 5 additions & 0 deletions code/datums/http.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@

var/_raw_response

/datum/http_request/New(...)
. = ..()
if(length(args))
src.prepare(arglist(args))

/datum/http_request/proc/prepare(method, url, body = "", list/headers, output_file)
if (!length(headers))
headers = ""
Expand Down
Loading

0 comments on commit b561cca

Please sign in to comment.