a bit more improved telnet urls
This commit is contained in:
+5
-2
@@ -106,8 +106,11 @@ gmparse() { # args: line, curhost, curport
|
|||||||
[[ '3' == "$rtype" ]] && desc="$ERRCOLOR$desc$ERESET" # wrap error messages in the coloration terminal commands
|
[[ '3' == "$rtype" ]] && desc="$ERRCOLOR$desc$ERESET" # wrap error messages in the coloration terminal commands
|
||||||
# handle external URLs as information lines of a special kind
|
# handle external URLs as information lines of a special kind
|
||||||
[[ 'h' == "$rtype" ]] && desc="$desc: ${sel#URL:}"
|
[[ 'h' == "$rtype" ]] && desc="$desc: ${sel#URL:}"
|
||||||
# handle 8-type resources as telnet:// URIs
|
if [[ '8' == "$rtype" ]]; then # handle 8-type resources as telnet:// URIs
|
||||||
[[ '8' == "$rtype" ]] && desc="$desc: telnet://${sel}@${rhost}:${rport}/"
|
local username="${sel}@"
|
||||||
|
[[ -z "${sel}" ]] && username=''
|
||||||
|
desc="$desc: telnet://${username}${rhost}:${rport}/"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
[[ '0' == "$rtype" ]] && action='P' # plain text is plain text
|
[[ '0' == "$rtype" ]] && action='P' # plain text is plain text
|
||||||
[[ '1' == "$rtype" ]] && action='M' # it's a Gophermap
|
[[ '1' == "$rtype" ]] && action='M' # it's a Gophermap
|
||||||
|
|||||||
Reference in New Issue
Block a user