aboutsummaryrefslogtreecommitdiff
path: root/captain/external.f90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2021-09-15 11:04:52 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2021-09-15 11:04:52 -0400
commita3fe1adbf76e16e218864a8cfecdea7e6bc5dccd (patch)
treecb5e5d4117bd96bcd1f43003193d43e94e05457f /captain/external.f90
parent842079426ac0b36ed6187faed231ecba15132b41 (diff)
downloadlevitating-a3fe1adbf76e16e218864a8cfecdea7e6bc5dccd.tar.gz
levitating-a3fe1adbf76e16e218864a8cfecdea7e6bc5dccd.zip
Added online and offline checking based on last checkin time for players. Added labeling of online status to most places players appear. Fixed css so display works in NetSurf.
Diffstat (limited to 'captain/external.f90')
-rw-r--r--captain/external.f9015
1 files changed, 7 insertions, 8 deletions
diff --git a/captain/external.f90 b/captain/external.f90
index 61184f1..0cdcfdf 100644
--- a/captain/external.f90
+++ b/captain/external.f90
@@ -242,10 +242,12 @@ contains
function generate_players_gemini() result(res)
use captain_db
+ use request_utils, only: get_player_status_utf8
implicit none
character(len=:), pointer::res
character(len=PLAYER_NAME_LENGTH), dimension(:), pointer::players
+ character(4)::player_status
integer::n, i, nsize
character(len=3*PLAYER_NAME_LENGTH)::one_player
@@ -270,7 +272,9 @@ contains
res = "## Existing Players"
do i = 1, n
- one_player = "=> /players/"//trim(players(i))//".gmi "//trim(players(i))
+ player_status = get_player_status_utf8(players(i))
+
+ one_player = "=> /players/"//trim(players(i))//".gmi "//trim(player_status)//" "//trim(players(i))
if(i == 1) then
res = trim(res)//new_line(res(1:1))//new_line(res(1:1))//trim(one_player)
else
@@ -289,7 +293,7 @@ contains
function generate_one_instuction_gemini(req) result(res)
use captain_db
use server_response
- use request_utils, only: get_status_utf8
+ use request_utils, only: get_player_status_utf8
use request_utils, only: render_jobs_links
implicit none
@@ -352,12 +356,7 @@ contains
res = trim(res)//nl//nl//"### Launch Now"
do i = 1, n_players
call get_player_name(players(i), player_name)
- if(is_player_busy(players(i))) then
- player_status = get_status_utf8(PLAYER_STATUS_BUSY)
- else
- player_status = get_status_utf8(PLAYER_STATUS_IDLE)
- end if
-
+ player_status = get_player_status_utf8(players(i))
res = trim(res)//nl//"=> "//trim(req%location)//"?launch="//trim(player_name)// &
" "//trim(player_status)//" "//trim(player_name)
end do