 .ONERR 999
.ENABLE QUIET
SET /SLAVE=TI:
.ENABLE SUBSTITUTION
.SETS UIC <UIC>
.PARSE UIC "[," PRE GR POST
.IF GR EQ "1" .GOTO 50
.IF GR EQ "5" .GOTO 50
.DISABLE QUIET
;
; [Computing disk usage...]
.GOSUB QUOTA
.GOSUB ALLOCT
.IF ALL LE QUO .SETN LEFT QUO-ALL
.IF ALL GT QUO .SETN LEFT ALL-QUO
;
; Disk Quota:       'QUO' blocks
; Blocks allocated: 'ALL'
; Blocks written:   'USED'
; No. of files:     'FILES'
;
.IF ALL LE QUO ; Space left:       'LEFT' blocks
.IF ALL GT QUO ; Space left:      -'LEFT' blocks
;
.IF ALL LE QUO .GOTO 50
.SETN OVER ALL-QUO
;
; You have used 'ALL' blocks of disk space which
; is more than the 'QUO' blocks you are allowed.
;
; You must delete,truncate and/or purge your account
; of 'OVER' blocks to get below your allotment before
; you can finish logging in.
;
; You will be allowed to use PIP to do this.
;
; When you are ready to proceed, type ^Z and if you
; are at or below quota you can continue.
; Otherwise, you will be logged out!
;
.ENABLE QUIET
PIP
.DISABLE QUIET
; [Recomputing disk usage...]
.GOSUB ALLOCT
.IF ALL LE QUO .GOTO 50
.SETN OVER ALL-QUO
.GOSUB NOTIFY
;
; You are still 'OVER' blocks over quota!
; Sorry...
;
.GOTO 999
.50:.GOSUB LOGON
.STOQ
.QUOTA:.SETN QUO 500.
.IF <UIC> EQ "[230,37]" .SETN QUO 1000.
.IF <UIC> EQ "[360,1]" .SETN QUO 3000.
.RETURN
.ALLOCT:.ENABLE QUIET
PIP QQQQQ.TMP=/TB
.OPENR #1 QQQQQ.TMP
.READ #1 JUNK
.READ #1 RECORD
.CLOSE #1
PIP QQQQQ.TMP;*/DE
.PARSE RECORD "F ./.N ." A B USED C ALLOC D E FILE F
.SETN ALL 'ALLOC'.
.SETN FIL 'FILE'.
.SETN FILES FIL-1.
.DISABLE QUIET
.RETURN
.LOGON:.ENABLE QUIET
SET /NOSLAVE=TI:
.IFINS ...MAI MAIL ?
.TESTFILE LOGIN.CMD
.IF <FILERR> NE 1 .GOTO 1
.DISABLE QUIET
@LOGIN
.1:.DISABLE QUIET
.RETURN
.NOTIFY:.TESTFILE LB:[1,2]LOGIN.CMD
.IF <FILERR> NE 1 .GOTO 1
.OPENA #1 LB:[1,2]LOGIN.CMD
.DATA #1 ; User '<UIC>' over quota by 'OVER' blocks at '<TIME>' on
'<DATE>'
.CLOSE #1
.1:.RETURN
.999:.ENABLE QUIET
BYE
.STOQ
