aboutsummaryrefslogtreecommitdiff
path: root/captain/external.f90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2021-04-01 12:39:06 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2021-04-01 12:39:06 -0400
commitb125906018d0d3d09baeebb096db56ca052902eb (patch)
tree5e5506a625361d7ddfcbe816a447f645567153a5 /captain/external.f90
parentaf084b8acb5ed7e883e422c4626a596eb32fba25 (diff)
downloadlevitating-b125906018d0d3d09baeebb096db56ca052902eb.tar.gz
levitating-b125906018d0d3d09baeebb096db56ca052902eb.zip
Fixed request parsing to initialize a necessary variable. Minor cosmetic changes to instruction handling.
Diffstat (limited to 'captain/external.f90')
-rw-r--r--captain/external.f9012
1 files changed, 8 insertions, 4 deletions
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")