 Rem File: Cmd103.bas
 Rem Sub: Display.Room
 Rem $Include: 'dndbbs.inc'
 On Error Goto Main.Error
 If Chained<>-2 Then
    Color 15,0
    Print "DNDBBS Command 103 -- Display.Room."
    Color 7,0
    End
 Endif
 Gosub Get.Config
 Call Encounter.Permanent
 If Config2(55) Then
    Call Encounter.Offline.User
 Endif
 Call Show.Room
 If Optionx1 Then ' nearby offline users
    Call Display.Users(True)
 Endif
 If Optionx2 Then ' nearby online users
    Call Display.Users(False)
 Endif

Main.Resume:
 Chain DND.Path+"DNDBBS.EXE"
 End
Main.Error:
 Resume Main.Resume

Get.Config:
 optionx1=-1
 optionx2=-1
 VarX=0
 Do
    VarX=VarX+1
    If VarX>Options.Lines Then
       Exit Do
    Endif
    Var$=Ltrim$(Rtrim$(Options.Array(VarX)))
    If Ucase$(Var$)="[CMD103]" Then
       Do
          VarX=VarX+1
          If VarX>Options.Lines Then
             Return
          Endif
          Var$=Ltrim$(Rtrim$(Options.Array(VarX)))
          If Ucase$(Var$)="[END]" Then
             Return
          Endif
          Var=Instr(Var$,"=")
          If Var Then
             Var2$=Ltrim$(Rtrim$(Left$(Var$,Var-1)))
             Var3$=Ltrim$(Rtrim$(Mid$(Var$,Var+1)))
             Select Case Lcase$(Var2$)
             Case "allow.display.offline.users"
                Select Case Lcase$(Var3$)
                Case "0", "false", "off"
                   optionx1=0
                End Select
             Case "allow.display.online.users"
                Select Case Lcase$(Var3$)
                Case "0", "false", "off"
                   optionx2=0
                End Select
             End Select
          Endif
       Loop
    Endif
 Loop
 Return
