/* AVT-ShowStatus by kNUCKLES/aVT */
/* Start: 10-03-94                */
/* Releasedate v1.0: 10-17-94     */
/* Releasedate v1.1: 10-22-94     */
/* Releasedate v1.2: 12-30-94     */

PARSE ARG Node
OPTIONS RESULTS
ADDRESS VALUE 'AERexxControl'Node

SIGNAL ON Error
SIGNAL ON Syntax
SIGNAL ON IOErr

CR=D2C(13)
CLS=D2C(12)
BEEP=D2C(7)

WH="[0m"    /* White  */
GR="[32m"   /* Green  */
YL="[33m"   /* Yellow */
CYN="[36m"  /* Cyan   */

GU=GETUSER
TR=TRANSMIT

GU 100;name=LEFT(RESULT,33,' ')
GU 102;location=LEFT(RESULT,30,' ')
GU 103;phone=LEFT(RESULT,12,' ')
GU 104;slot=RIGHT(RESULT,3,'0')
GU 105;seclevel=LEFT(RESULT,3,' ')
GU 106;ratiotype=RESULT
IF ratiotype=0 THEN ratiotext="Byte";IF ratiotype=1 THEN ratiotext="Byte/File";IF ratiotype=2 THEN ratiotext="File"
GU 107;rationum=RESULT
GU 109;messages=RESULT
GU 110;uploads=RESULT
GU 111;downloads=RESULT
GU 112;timescalled=RESULT
GU 114;timeused=RESULT
GU 115;timelimit=RESULT
GU 116;timetotal=RESULT
GU 117;bytesup=RESULT
GU 118;bytesdown=RESULT
GU 119;bytelimit=RESULT
GU 121;xpert=UPPER(RESULT)
xperttext="OFF Not used to /X ?!"
IF xpert="X" THEN xperttext="ON  Of course!" 
GU 142;sysopchat=UPPER(RESULT)
chattext="SysOp available"
IF sysopchat="OFF" THEN chattext="SysOp [31mNOT [0mavailable"
GU 143;laston=RESULT
GU 144;currtime=RESULT
GU 146;confacc=LEFT(RESULT,9,' ')
GU 149;node=RESULT
GU 152;axver=RESULT
GU 505;bps=LEFT(RESULT,6,' ')
GU 11;bbsname=RESULT
GU 12;sysop=RESULT

TR CLS
TR "   [0 p[0;44m     ____ _____________        ____________  ____  ______   _______      [0m"
TR "   [0;44m    /    \       /__   |      /   ___/__   |/    \\\__   | /   ___/_ __  [0m"
TR "   [0;44m  ./     \\    // /   || -÷- /\__   \ /   ||     \\ /   ||/\__   \ \/  ' [0m"
TR "   [0;44m  /________\___/ /_____|[35m÷2F÷[0;44m/_______//_____|______.:.____|_______/       [0m"
TR "   [0;44m    [33maVANTGARDE - sTATUS v1.2 - by kNUCKLES^2fAST![0;44m  :[31munregistered         [0m"
TR CR
TR GR"   User Name"CYN":"WH name GR"Password."CYN": [44mENCRYPTED[40m"
TR GR"   Location."CYN":"WH location" [2C "GR"Calls...."CYN":"WH timescalled
TR GR"   Phone...."CYN":"WH phone" [20C "GR"Messages."CYN":"WH messages
TR GR"   Slot....."CYN":"WH slot "[30C"GR"Uploads.."CYN":"WH uploads
TR GR"   SecLevel."CYN":"WH seclevel "[30C"GR"Downloads"CYN":"WH downloads
TR GR"   ConfAccss"CYN":"WH confacc "[24C"GR"Bytes Up."CYN":"WH bytesup
TR GR"   Ratiotype"CYN":"WH LEFT(ratiotext,9,' ') "[24C"GR"Bytes Dwn"CYN":"WH bytesdown
IF rationum=0 THEN TR GR"   Ratio...."CYN": [31mDISABLED! [24C"GR"Bytelimit"CYN":"WH bytelimit; ELSE TR GR"   Ratio...."CYN":"WH rationum":1 [30C"GR"Bytelimit"CYN":"WH bytelimit
TR GR"   Bps......"CYN":"WH bps "[26C "GR"XPertMode"CYN":"WH xperttext
TR GR"   Act Time."CYN":"WH currtime"[9C "GR"Your Node"CYN":"WH node
TR GR"   Last On.."CYN":"WH laston "[9C"GR"BBS-Name."CYN":"WH bbsname
TR GR"   Time Used"CYN":"WH RIGHT(TRUNC(timeused/60,0),5,' ')" mins [23C"GR"/X  Vers."CYN":"WH axver
TR GR"   TimeLimit"CYN":"WH RIGHT(TRUNC(timelimit/60,0),5,' ')" mins [22C "GR"SysopName"CYN":"WH sysop
TR GR"   TimeTotal"CYN":"WH RIGHT(timetotal/60,5,' ')" mins [22C "GR"Chat....."CYN":"WH chattext

TR CR"[1 p"

PUTUSTR ""
PUTUSER 136
CALL BYE


/* END PART */

ERROR:
 TR "[31m"
 TR "Error in Line #"Sigl" : exiting ..."
 TR ERRORTEXT(Sigl)
CALL BYE

SYNTAX:
 TR "[31m"
 TR "Syntax Error in Line #"Sigl" : exiting ..."
 TR ERRORTEXT(Sigl)
CALL BYE

IOERR:
 TR "[31m"
 TR "I/O Error in Line #"Sigl" : exiting ..."
 TR ERRORTEXT(Sigl)
CALL BYE

BYE:
 TR "[0m"
 SHUTDOWN
 EXIT
END
