allow match refreshing

This commit is contained in:
sose 2021-04-06 23:45:58 +00:00
parent b8183adda8
commit 984d214f13
3 changed files with 9 additions and 1 deletions

4
hltv
View File

@ -20,6 +20,10 @@ then
elif [ "$QUERY_STRING" = "matches" ]
then
$CGI_BIN/hltv_matches
elif [ "$QUERY_STRING" = "reload" ]
then
curl "https://illegaldrugs.net/skor?reload" >/dev/null
$CGI_BIN/hltv_matches
else
$CGI_BIN/hltv_matches
fi

View File

@ -81,6 +81,7 @@ live_matches = [ x for x in matches if x["start_time"] == "LIVE" ]
upcoming_matches = [ x for x in matches if x["start_time"] != "LIVE" and x["start_time"] != "OVER" ]
ended_matches = [ x for x in matches if x["start_time"] == "OVER" ]
if len(live_matches) != 0:
print("# LIVE")
print_matches(live_matches)
@ -94,4 +95,6 @@ if len(ended_matches) != 0:
print("# COMPLETED")
print_matches(ended_matches)
print("=> ?reload Refresh match list (only use this if a match that should be live is still in \"upcoming\")")
print("Powered by sk0R")

View File

@ -1,6 +1,7 @@
#!/usr/bin/php
<?php
# its in php because I got lazy and just stripped down news.php
# cool language tho it gets too much hate
$abs_path = "gemini://" . getenv("SERVER_NAME") . getenv("SCRIPT_NAME");
$READER_LINK = dirname($abs_path) . "/reader";