From b125906018d0d3d09baeebb096db56ca052902eb Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Thu, 1 Apr 2021 12:39:06 -0400 Subject: Fixed request parsing to initialize a necessary variable. Minor cosmetic changes to instruction handling. --- captain/external.f90 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'captain/external.f90') diff --git a/captain/external.f90 b/captain/external.f90 index ee4d2e6..d572a7e 100644 --- a/captain/external.f90 +++ b/captain/external.f90 @@ -242,10 +242,14 @@ contains allocate(character(len=nsize) :: res) res = nl//"## "//trim(instruction_name) + + i = index(req%location, ".gmi", back=.true.) + res = trim(res)//nl//"=> "//req%location(1:i-1)//".json View Raw" + if(n_players == 0) then res = trim(res)//nl//nl//"No players currently can run these instructions" else - res = trim(res)//nl//nl//"## Launch Now" + 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 @@ -255,7 +259,7 @@ contains end if res = trim(res)//nl//"=> "//trim(req%location)//"?launch="//trim(player_name)// & - " "//trim(player_status)//trim(player_name) + " "//trim(player_status)//" "//trim(player_name) end do end if @@ -361,7 +365,7 @@ contains res = "## Instructions" do i = 1, n - one_player = "=> /instructions/"//trim(instruction_names(i))//".json "//trim(instruction_names(i)) + one_player = "=> /instructions/"//trim(instruction_names(i))//".gmi "//trim(instruction_names(i)) if(i == 1) then res = trim(res)//new_line(res(1:1))//new_line(res(1:1))//trim(one_player) else @@ -598,7 +602,7 @@ contains call write_log("Processing request") call req%path_component(1, first) - + if(trim(req%location) == "/" .or. trim(req%location) == "/index.gmi") then call write_log("Assign") -- cgit v1.2.3