/*
  REXX-CODER-PACKER by ANDY/MOTION[30m*/parse arg node;options results;nodeid = 'AERexxControl'node ; address value nodeid;signal on SYNTAX ; signal on ERROR;tr = transmit;nul ='0'x;cls = '0c'x ; cr = '0a'x||'0d'x;nodes = 0 ; getuser 123 ; nod = result ; do i = 0 to length(nod) ; if substr(nod,i+1,1)="X" then nodes=nodes+1 ; end;showfile "dh0:release/bbs/doors/akira/aka-frontend.top";tr ' ';tr "  [0m[34m.------.---------------.--------------------.----------------.---------.";do i=0 to nodes-1;  if open('aa','env:STATS@'i'','R') then do;    ugg=readln('aa') ; stat = right(ugg,2); close('aa');    call status(stat) ; act=result;  end;  if ~exists('env:STATS@'i'') then act='-=*%( nOT rUNNiNG )%*=-';  handle = ' ' ; loca=' ' ; baud = 57600;  if open('user','bbs:node'i'.user','R') then do;      info = readch('user',232) ; close('user');      parse var info handle (NUL) 31 pass (NUL) 39 loca (NUL) 29;      open('keys','bbs:node'i'.userkeys','R');      info = readch('keys',56) ; baud = c2d(substr(info,45,2));      close('keys');  end;if handle ='' then do;  handle = 'Awaiting';end;if loca ='' then do;loca = 'Nowhere';end;  tr '  [34m| [0mNd[35m#[36m'right(i,1)'[34m |[36m'centre(handle,14)'[34m  [36m'centre(loca,20)'[34m [36m'centre(act,16)'[34m|  [36m'centre(baud,5)'[34m  |';end;tr "  [0m[1;34m`------^---------------^--------------------^----------------^---------'";tr "                                                                 [0m[35m[[36mJdn/Aka[35m][0m";showfile "dh0:release/bbs/doors/akira/aka-frontend.tail";shutdown;exit;end;status: procedure;action=arg(1);if action = 00 then txt = 'Idle';if action = 01 then txt = 'Download';if action = 02 then txt = 'Upload';if action = 03 then txt = 'In a Door';if action = 04 then txt = 'R/W Mail';if action = 05 then txt = 'Changing Stats';if action = 06 then txt = 'Hacking';if action = 07 then txt = 'Inactive';if action = 08 then txt = 'Scanning Filelist';if action = 09 then txt = 'Scanning Bulletins';if action = 10 then txt = 'Viewing TextFiles';if action = 11 then txt = 'Logon';if action = 12 then txt = 'Logoff';if action = 13 then txt = 'Comment to Sysop';if action = 14 then txt = 'Unknown';if action = 15 then txt = 'Edit Dirs';if action = 16 then txt = 'Join Conf';if action = 17 then txt = 'Chatting';if action = 18 then txt = 'Logoffbatch';if action = 19 then txt = 'Paging Sysop';if action = 20 then txt = 'Shutdown';if action = 21 then txt = 'Idle';if action = 22 then txt = 'Awaiting Connect';if action = 23 then txt = 'Reading Mail';if action = 24 then txt = 'Inactive';if action = 25 then txt = 'Multichatting';if action > 25 then txt = 'Idle';return txt;ERROR:; tr 'ERROR... 'sigl;shutdown;exit;SYNTAX:;tr 'SYNTAX... 'sigl;shutdown;exit
