/*
 Info.spot 1.0 written on 14-Jul-93 by Stefan Hochmuth
 requires mail:bin/getnode from TrapDoor
 displays getnode's output in a requester on the Spot screen */

nodeinfocmd="mail:bin/getnode"

options results

abort=0

getfromaddress
requeststring 'TITLE="Info on Node X" PROMPT="Enter Node:" DEFAULT '||result
if rc = 5 then abort=1 
eingabe = result

if abort=0 then do
 address COMMAND nodeinfocmd||" >ram:nodeinfo.spot "||eingabe
 if open('infofile','ram:nodeinfo.spot',R) then do
  ausgabe=readch('infofile',300)
  dummy=close('infofile')

  address COMMAND "delete >NIL: ram:nodeinfo.spot"
  /* convert LF to CR */
  ausgabe=translate(ausgabe,'0d'x,"0a"x," ")
  /* don't show password */
  len=pos("Password",ausgabe)-2
  if len < 1 then len=length(ausgabe)-1
  ausgabe=left(ausgabe,len)
  /* delete trailing spaces, remove "s */
  ausgabe='"'||trim(translate(ausgabe,' ','"',' '))||'"'
  requestnotify ausgabe

 end
end
