]> code.citadel.org Git - citadel.git/blob - wincit/roomprom.frm
- further configure tweaks for FreeBSD and Tru64 Unix
[citadel.git] / wincit / roomprom.frm
1 VERSION 4.00
2 Begin VB.Form RoomPrompt 
3    AutoRedraw      =   -1  'True
4    BorderStyle     =   0  'None
5    ClientHeight    =   6210
6    ClientLeft      =   1005
7    ClientTop       =   1935
8    ClientWidth     =   9600
9    ForeColor       =   &H80000008&
10    Height          =   6900
11    Left            =   945
12    LinkTopic       =   "Form1"
13    MaxButton       =   0   'False
14    MDIChild        =   -1  'True
15    MinButton       =   0   'False
16    ScaleHeight     =   6210
17    ScaleWidth      =   9600
18    ShowInTaskbar   =   0   'False
19    Top             =   1305
20    Width           =   9720
21    Begin VB.CommandButton button_abandon 
22       Appearance      =   0  'Flat
23       BackColor       =   &H80000005&
24       Caption         =   "&Abandon"
25       BeginProperty Font 
26          name            =   "MS Sans Serif"
27          charset         =   0
28          weight          =   700
29          size            =   8.25
30          underline       =   0   'False
31          italic          =   0   'False
32          strikethrough   =   0   'False
33       EndProperty
34       Height          =   372
35       Index           =   0
36       Left            =   0
37       TabIndex        =   21
38       Top             =   720
39       Width           =   1572
40    End
41    Begin VB.ListBox OldRooms 
42       Appearance      =   0  'Flat
43       BackColor       =   &H00C0C0C0&
44       Columns         =   6
45       Height          =   1980
46       Left            =   120
47       Sorted          =   -1  'True
48       TabIndex        =   17
49       Top             =   3960
50       Width           =   10095
51    End
52    Begin VB.ListBox NewRooms 
53       Appearance      =   0  'Flat
54       BackColor       =   &H00C0C0C0&
55       Columns         =   6
56       Height          =   1980
57       Left            =   120
58       Sorted          =   -1  'True
59       TabIndex        =   14
60       Top             =   1560
61       Width           =   10095
62    End
63    Begin VB.CommandButton button_ungoto 
64       Appearance      =   0  'Flat
65       BackColor       =   &H80000005&
66       Caption         =   "&Ungoto"
67       Enabled         =   0   'False
68       BeginProperty Font 
69          name            =   "MS Sans Serif"
70          charset         =   0
71          weight          =   700
72          size            =   8.25
73          underline       =   0   'False
74          italic          =   0   'False
75          strikethrough   =   0   'False
76       EndProperty
77       Height          =   372
78       Left            =   1560
79       TabIndex        =   11
80       Top             =   0
81       Width           =   1572
82    End
83    Begin VB.CommandButton button_page 
84       Appearance      =   0  'Flat
85       BackColor       =   &H80000005&
86       Caption         =   "&Page a user"
87       BeginProperty Font 
88          name            =   "MS Sans Serif"
89          charset         =   0
90          weight          =   700
91          size            =   8.25
92          underline       =   0   'False
93          italic          =   0   'False
94          strikethrough   =   0   'False
95       EndProperty
96       Height          =   372
97       Left            =   6240
98       TabIndex        =   13
99       Top             =   360
100       Width           =   1572
101    End
102    Begin VB.CommandButton button_dir 
103       Appearance      =   0  'Flat
104       BackColor       =   &H80000005&
105       Caption         =   "Read &Directory"
106       Enabled         =   0   'False
107       BeginProperty Font 
108          name            =   "MS Sans Serif"
109          charset         =   0
110          weight          =   700
111          size            =   8.25
112          underline       =   0   'False
113          italic          =   0   'False
114          strikethrough   =   0   'False
115       EndProperty
116       Height          =   372
117       Left            =   1560
118       TabIndex        =   12
119       Top             =   720
120       Width           =   1572
121    End
122    Begin VB.CommandButton button_chat 
123       Appearance      =   0  'Flat
124       BackColor       =   &H80000005&
125       Caption         =   "&Chat"
126       BeginProperty Font 
127          name            =   "MS Sans Serif"
128          charset         =   0
129          weight          =   700
130          size            =   8.25
131          underline       =   0   'False
132          italic          =   0   'False
133          strikethrough   =   0   'False
134       EndProperty
135       Height          =   375
136       Left            =   4680
137       TabIndex        =   5
138       Top             =   720
139       Width           =   1575
140    End
141    Begin VB.CommandButton button_who 
142       Appearance      =   0  'Flat
143       BackColor       =   &H80000005&
144       Caption         =   "&Who is online"
145       BeginProperty Font 
146          name            =   "MS Sans Serif"
147          charset         =   0
148          weight          =   700
149          size            =   8.25
150          underline       =   0   'False
151          italic          =   0   'False
152          strikethrough   =   0   'False
153       EndProperty
154       Height          =   372
155       Left            =   6240
156       TabIndex        =   6
157       Top             =   0
158       Width           =   1572
159    End
160    Begin VB.CommandButton button_terminate 
161       Appearance      =   0  'Flat
162       BackColor       =   &H80000005&
163       Caption         =   "&Terminate"
164       BeginProperty Font 
165          name            =   "MS Sans Serif"
166          charset         =   0
167          weight          =   700
168          size            =   8.25
169          underline       =   0   'False
170          italic          =   0   'False
171          strikethrough   =   0   'False
172       EndProperty
173       Height          =   375
174       Index           =   3
175       Left            =   6240
176       TabIndex        =   2
177       Top             =   720
178       Width           =   1575
179    End
180    Begin VB.CommandButton button_skip 
181       Appearance      =   0  'Flat
182       BackColor       =   &H80000005&
183       Caption         =   "&Skip"
184       BeginProperty Font 
185          name            =   "MS Sans Serif"
186          charset         =   0
187          weight          =   700
188          size            =   8.25
189          underline       =   0   'False
190          italic          =   0   'False
191          strikethrough   =   0   'False
192       EndProperty
193       Height          =   372
194       Index           =   1
195       Left            =   0
196       TabIndex        =   1
197       Top             =   360
198       Width           =   1572
199    End
200    Begin VB.CommandButton button_zap 
201       Appearance      =   0  'Flat
202       BackColor       =   &H80000005&
203       Caption         =   "&Zap (forget)"
204       BeginProperty Font 
205          name            =   "MS Sans Serif"
206          charset         =   0
207          weight          =   700
208          size            =   8.25
209          underline       =   0   'False
210          italic          =   0   'False
211          strikethrough   =   0   'False
212       EndProperty
213       Height          =   372
214       Left            =   1560
215       TabIndex        =   7
216       Top             =   360
217       Width           =   1572
218    End
219    Begin VB.CommandButton button_forward 
220       Appearance      =   0  'Flat
221       BackColor       =   &H80000005&
222       Caption         =   "Read &Forward"
223       BeginProperty Font 
224          name            =   "MS Sans Serif"
225          charset         =   0
226          weight          =   700
227          size            =   8.25
228          underline       =   0   'False
229          italic          =   0   'False
230          strikethrough   =   0   'False
231       EndProperty
232       Height          =   375
233       Index           =   5
234       Left            =   4680
235       TabIndex        =   4
236       Top             =   0
237       Width           =   1575
238    End
239    Begin VB.CommandButton button_old 
240       Appearance      =   0  'Flat
241       BackColor       =   &H80000005&
242       Caption         =   "Read &Old"
243       BeginProperty Font 
244          name            =   "MS Sans Serif"
245          charset         =   0
246          weight          =   700
247          size            =   8.25
248          underline       =   0   'False
249          italic          =   0   'False
250          strikethrough   =   0   'False
251       EndProperty
252       Height          =   372
253       Left            =   3120
254       TabIndex        =   10
255       Top             =   360
256       Width           =   1572
257    End
258    Begin VB.CommandButton button_new 
259       Appearance      =   0  'Flat
260       BackColor       =   &H80000005&
261       Caption         =   "Read &New"
262       BeginProperty Font 
263          name            =   "MS Sans Serif"
264          charset         =   0
265          weight          =   700
266          size            =   8.25
267          underline       =   0   'False
268          italic          =   0   'False
269          strikethrough   =   0   'False
270       EndProperty
271       Height          =   372
272       Left            =   3120
273       TabIndex        =   9
274       Top             =   0
275       Width           =   1572
276    End
277    Begin VB.CommandButton button_last5 
278       Appearance      =   0  'Flat
279       BackColor       =   &H80000005&
280       Caption         =   "Read &Last 5"
281       BeginProperty Font 
282          name            =   "MS Sans Serif"
283          charset         =   0
284          weight          =   700
285          size            =   8.25
286          underline       =   0   'False
287          italic          =   0   'False
288          strikethrough   =   0   'False
289       EndProperty
290       Height          =   375
291       Left            =   4680
292       TabIndex        =   8
293       Top             =   360
294       Width           =   1575
295    End
296    Begin VB.CommandButton button_goto 
297       Appearance      =   0  'Flat
298       BackColor       =   &H80000005&
299       Caption         =   "&Goto"
300       BeginProperty Font 
301          name            =   "MS Sans Serif"
302          charset         =   0
303          weight          =   700
304          size            =   8.25
305          underline       =   0   'False
306          italic          =   0   'False
307          strikethrough   =   0   'False
308       EndProperty
309       Height          =   372
310       Index           =   0
311       Left            =   0
312       TabIndex        =   0
313       Top             =   0
314       Width           =   1572
315    End
316    Begin VB.CommandButton button_enter 
317       Appearance      =   0  'Flat
318       BackColor       =   &H80000005&
319       Caption         =   "&Enter message"
320       BeginProperty Font 
321          name            =   "MS Sans Serif"
322          charset         =   0
323          weight          =   700
324          size            =   8.25
325          underline       =   0   'False
326          italic          =   0   'False
327          strikethrough   =   0   'False
328       EndProperty
329       Height          =   372
330       Index           =   4
331       Left            =   3120
332       TabIndex        =   3
333       Top             =   720
334       Width           =   1572
335    End
336    Begin Threed.SSFrame Frame3D1 
337       Height          =   1335
338       Left            =   7830
339       TabIndex        =   18
340       Top             =   0
341       Width           =   1755
342       _Version        =   65536
343       _ExtentX        =   3096
344       _ExtentY        =   2355
345       _StockProps     =   14
346       Caption         =   "Current room:"
347       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
348          name            =   "MS Sans Serif"
349          charset         =   0
350          weight          =   700
351          size            =   8.25
352          underline       =   0   'False
353          italic          =   0   'False
354          strikethrough   =   0   'False
355       EndProperty
356       Begin VB.Label MsgsCount 
357          Alignment       =   2  'Center
358          Appearance      =   0  'Flat
359          BackColor       =   &H00808080&
360          BackStyle       =   0  'Transparent
361          BeginProperty Font 
362             name            =   "MS Sans Serif"
363             charset         =   0
364             weight          =   700
365             size            =   8.25
366             underline       =   0   'False
367             italic          =   0   'False
368             strikethrough   =   0   'False
369          EndProperty
370          ForeColor       =   &H80000008&
371          Height          =   372
372          Left            =   36
373          TabIndex        =   20
374          Top             =   840
375          Width           =   456
376       End
377       Begin VB.Label CurrRoom 
378          Alignment       =   2  'Center
379          Appearance      =   0  'Flat
380          AutoSize        =   -1  'True
381          BackColor       =   &H00808080&
382          BackStyle       =   0  'Transparent
383          BeginProperty Font 
384             name            =   "Arial"
385             charset         =   0
386             weight          =   700
387             size            =   12
388             underline       =   0   'False
389             italic          =   0   'False
390             strikethrough   =   0   'False
391          EndProperty
392          ForeColor       =   &H00000000&
393          Height          =   285
394          Left            =   225
395          TabIndex        =   19
396          Top             =   360
397          Width           =   60
398       End
399    End
400    Begin VB.Label Label2 
401       Appearance      =   0  'Flat
402       AutoSize        =   -1  'True
403       BackColor       =   &H00C0C0C0&
404       Caption         =   "No unseen messages in:"
405       ForeColor       =   &H00800000&
406       Height          =   240
407       Left            =   120
408       TabIndex        =   16
409       Top             =   3720
410       Width           =   2184
411    End
412    Begin VB.Label Label1 
413       Appearance      =   0  'Flat
414       AutoSize        =   -1  'True
415       BackColor       =   &H00C0C0C0&
416       Caption         =   "Rooms with unread messages:"
417       ForeColor       =   &H00800000&
418       Height          =   240
419       Left            =   120
420       TabIndex        =   15
421       Top             =   1200
422       Width           =   2736
423    End
424    Begin VB.Menu menu_enter 
425       Caption         =   "&Enter"
426       Begin VB.Menu menu_enter_conf 
427          Caption         =   "&Configuration"
428       End
429       Begin VB.Menu menu_enter_file 
430          Caption         =   "&File (upload)"
431       End
432       Begin VB.Menu menu_enter_regis 
433          Caption         =   "Re&gistration Info"
434       End
435       Begin VB.Menu menu_enter_passwd 
436          Caption         =   "Set &Password..."
437       End
438       Begin VB.Menu menu_enter_room 
439          Caption         =   "Create New &Room..."
440       End
441    End
442    Begin VB.Menu menu_read 
443       Caption         =   "&Read"
444       Begin VB.Menu menu_read_directory 
445          Caption         =   "&Directory"
446       End
447       Begin VB.Menu menu_read_file 
448          Caption         =   "&File (download)"
449       End
450       Begin VB.Menu menu_read_info 
451          Caption         =   "Room &Info File"
452       End
453       Begin VB.Menu menu_read_userlist 
454          Caption         =   "&User List"
455       End
456    End
457    Begin VB.Menu menu_term 
458       Caption         =   "&Terminate"
459       Begin VB.Menu menu_term_quit 
460          Caption         =   "Terminate and &Quit"
461       End
462       Begin VB.Menu menu_term_stay 
463          Caption         =   "Terminate and &Stay Online"
464       End
465    End
466    Begin VB.Menu menu_aide 
467       Caption         =   "&Aide"
468       Begin VB.Menu menu_aide_edit 
469          Caption         =   "&Edit Room..."
470       End
471       Begin VB.Menu menu_aide_file 
472          Caption         =   "&File Commands..."
473          Begin VB.Menu menu_aide_file_delete 
474             Caption         =   "&Delete File..."
475          End
476          Begin VB.Menu menu_aide_file_move 
477             Caption         =   "&Move File..."
478          End
479          Begin VB.Menu menu_aide_file_send 
480             Caption         =   "&Send File over Net..."
481          End
482       End
483       Begin VB.Menu menu_aide_info 
484          Caption         =   "Edit &Info File"
485       End
486       Begin VB.Menu menu_aide_kill 
487          Caption         =   "&Kill this Room"
488       End
489       Begin VB.Menu menu_aide_room 
490          Caption         =   "&Room commands..."
491          Begin VB.Menu menu_aide_room_invite 
492             Caption         =   "&Invite a user..."
493          End
494          Begin VB.Menu menu_aide_room_kick 
495             Caption         =   "&Kick out a user..."
496          End
497       End
498       Begin VB.Menu menu_aide_useredit 
499          Caption         =   "Edit a &User..."
500       End
501       Begin VB.Menu menu_aide_valid 
502          Caption         =   "&Validate New Users..."
503       End
504       Begin VB.Menu menu_aide_whoknows 
505          Caption         =   "&Who Knows Room"
506       End
507    End
508 End
509 Attribute VB_Name = "RoomPrompt"
510 Attribute VB_Creatable = False
511 Attribute VB_Exposed = False
512 Dim newmsgs%
513
514 Private Sub button_abandon_Click(Index As Integer)
515
516     If begin_trans() = True Then
517         serv_puts ("SLRP " + Str$(LastMessageRead&))
518         a$ = serv_gets()
519         Call end_trans
520         newmsgs% = 1
521         Call button_skip_click(0)
522         End If
523
524 End Sub
525
526 Private Sub button_chat_Click()
527
528 If begin_trans() = True Then
529     serv_puts ("CHAT")
530     a$ = serv_gets()
531     If Left$(a$, 1) = "8" Then
532         Unload RoomPrompt
533         Load ChatWindow
534     Else
535         end_trans
536         End If
537     End If
538
539 End Sub
540
541 Private Sub button_dir_Click()
542     Call menu_read_directory_click
543 End Sub
544
545 Private Sub button_enter_Click(Index As Integer)
546
547     recp$ = ""
548     can_enter% = 0
549
550     If begin_trans() = True Then
551               serv_puts ("ENT0")
552               a$ = serv_gets()
553               If Left$(a$, 1) = "2" Then can_enter% = 1
554               If Left$(a$, 3) = "570" Then can_enter% = 2
555         Call end_trans
556         End If
557
558     If can_enter% = 0 Then
559         MsgBox Right$(a$, Len(a$) - 4)
560         End If
561     If can_enter% = 1 Then
562         Unload RoomPrompt
563         Load EnterMessage
564         End If
565     If can_enter% = 2 Then
566         Unload RoomPrompt
567         Load Recipient
568         End If
569
570 End Sub
571
572 Private Sub button_forward_Click(Index As Integer)
573
574     max_msgs% = 0
575     If begin_trans() = False Then GoTo skipfwd
576     serv_puts ("MSGS ALL")
577     a$ = serv_gets()
578
579     If Left$(a$, 1) = "1" Then
580         Do
581             a$ = serv_gets()
582             If a$ = "000" Then Exit Do
583             msg_array&(max_msgs%) = CLng(Val(a$))
584             max_msgs% = max_msgs% + 1
585             Loop
586         End If
587     Call end_trans
588 skipfwd:
589
590     If max_msgs% > 0 Then
591         Unload RoomPrompt
592         Load ReadMessages
593     Else
594         MsgBox "This room is empty."
595         End If
596
597 End Sub
598
599 Private Sub button_goto_click(Index As Integer)
600
601     If begin_trans() = True Then
602         serv_puts ("SLRP HIGHEST")
603         a$ = serv_gets()
604         Call end_trans
605         If NewRooms.ListIndex >= 0 Then newmsgs% = 0
606         If OldRooms.ListIndex >= 0 Then newmsgs% = 1
607         Call button_skip_click(0)
608         End If
609
610 End Sub
611
612
613 Private Sub button_last5_Click()
614     max_msgs% = 0
615     If begin_trans() = False Then GoTo skiplast5
616     serv_puts ("MSGS LAST|5")
617     a$ = serv_gets()
618
619     If Left$(a$, 1) = "1" Then
620         Do
621             a$ = serv_gets()
622             If a$ = "000" Then Exit Do
623             msg_array&(max_msgs%) = CLng(Val(a$))
624             max_msgs% = max_msgs% + 1
625             Loop
626         End If
627     Call end_trans
628 skiplast5:
629
630     If max_msgs% > 0 Then
631         Unload RoomPrompt
632         Load ReadMessages
633     Else
634         MsgBox "This room is empty."
635         End If
636
637
638
639 End Sub
640
641 Private Sub button_new_Click()
642     max_msgs% = 0
643     If begin_trans() = False Then GoTo skipnew
644     serv_puts ("MSGS NEW")
645     a$ = serv_gets()
646
647     If Left$(a$, 1) = "1" Then
648         Do
649             a$ = serv_gets()
650             If a$ = "000" Then Exit Do
651             msg_array&(max_msgs%) = CLng(Val(a$))
652             max_msgs% = max_msgs% + 1
653             Loop
654         End If
655     Call end_trans
656 skipnew:
657
658     If max_msgs% > 0 Then
659         Unload RoomPrompt
660         Load ReadMessages
661     Else
662         MsgBox "This room is empty."
663         End If
664
665
666 End Sub
667
668 Private Sub button_old_Click()
669     max_msgs% = 0
670     If begin_trans() = False Then GoTo skipold
671     serv_puts ("MSGS OLD")
672     a$ = serv_gets()
673
674     If Left$(a$, 1) = "1" Then
675         Do
676             a$ = serv_gets()
677             If a$ = "000" Then Exit Do
678             msg_array&(max_msgs%) = CLng(Val(a$))
679             max_msgs% = max_msgs% + 1
680             Loop
681         End If
682     Call end_trans
683 skipold:
684
685     If max_msgs% > 0 Then
686         Unload RoomPrompt
687         Load ReadMessages
688     Else
689         MsgBox "This room is empty."
690         End If
691
692
693 End Sub
694
695 Private Sub button_page_Click()
696
697 Unload RoomPrompt
698 Load PageUser
699
700 End Sub
701
702 Private Sub button_skip_click(Index As Integer)
703
704     h$ = CurrRoomName$
705     n% = newmsgs%
706     
707     a% = OldRooms.ListIndex
708     If (a% >= 0) Then
709         b$ = OldRooms.List(a%)
710         End If
711
712     a% = NewRooms.ListIndex
713     If (a% >= 0) Then
714         b$ = NewRooms.List(a%)
715         End If
716
717     Call goto_room(b$)
718     If n% = 0 Then
719         OldRooms.AddItem (h$)
720     Else
721         NewRooms.AddItem (h$)
722         End If
723     
724 End Sub
725
726 Private Sub button_terminate_click(Index As Integer)
727
728     If begin_trans() = True Then
729         serv_puts ("LOUT")
730         buf$ = serv_gets()
731         Call end_trans
732         Unload RoomPrompt
733         Load CitUser
734         End If
735
736 End Sub
737
738 Private Sub button_who_Click()
739     Unload RoomPrompt
740     Load WhoIsOnline
741 End Sub
742
743 Private Sub button_zap_Click()
744     q% = MsgBox("Are you sure you want to Zap (forget) '" + CurrRoomName$ + "'?", 33, CurrRoomName$)
745
746     If q% = 1 Then
747
748         If begin_trans() = True Then
749     
750             serv_puts ("FORG")
751             a$ = serv_gets()
752             Call end_trans
753             End If
754
755         If Left$(a$, 1) <> "2" Then
756             MsgBox Right$(a$, Len(a$) - 4), 16, "Error"
757         Else
758             Call goto_room("_BASEROOM_")
759             End If
760         End If
761
762 End Sub
763
764 Private Sub Form_Load()
765     NewRooms.Left = RoomPrompt.Left + 120
766     NewRooms.Width = RoomPrompt.Width - 240
767
768     OldRooms.Left = RoomPrompt.Left + 120
769     OldRooms.Width = RoomPrompt.Width - 240
770     
771     Show
772     RoomPrompt.WindowState = 2
773     
774     If SaveOldCount = 0 And SaveNewCount = 0 Then
775         Call RefreshRoomLists
776     Else
777         NewRooms.Clear
778         OldRooms.Clear
779         For a% = 1 To SaveNewCount
780             NewRooms.AddItem (SaveNewRooms$(a%))
781             Next a%
782         For a% = 1 To SaveOldCount
783             OldRooms.AddItem (SaveOldRooms$(a%))
784             Next a%
785         End If
786     If CurrRoomName$ = "" Then CurrRoomName$ = "_BASEROOM_"
787     Call goto_room(CurrRoomName$)
788
789     If LastMessageRead& > 0 Then
790         button_abandon(0).Enabled = True
791     Else
792         button_abandon(0).Enabled = False
793         End If
794
795     Show
796
797 End Sub
798
799 Private Sub Form_Resize()
800
801     RoomPrompt.Left = 0
802     RoomPrompt.Top = 0
803     RoomPrompt.Width = MainWin.Width - 200
804     RoomPrompt.Height = MainWin.Height - 600
805
806     NewRooms.Left = RoomPrompt.Left + 60
807     NewRooms.Width = RoomPrompt.Width - 120
808
809     OldRooms.Left = RoomPrompt.Left + 60
810     OldRooms.Width = RoomPrompt.Width - 120
811
812     NewRooms.Top = Label1.Top + Label1.Height
813     NewRooms.Height = Abs(Int(((RoomPrompt.Height - Label1.Top) / 2) - 300))
814
815     Label2.Top = NewRooms.Top + NewRooms.Height + 20
816     OldRooms.Top = Label2.Top + Label2.Height
817     OldRooms.Height = Abs((RoomPrompt.Height - OldRooms.Top) - 300)
818
819     Frame3D1.Width = Abs((RoomPrompt.Width - Frame3D1.Left) - 120)
820     CurrRoom.Width = Abs(Frame3D1.Width - 150)
821     MsgsCount.Width = Abs(Frame3D1.Width - 150)
822
823     'CurrRoom.FontSize = Abs(Frame3D1.Width / 225)
824
825 End Sub
826
827 Private Sub Form_Unload(Cancel As Integer)
828
829     ' Save the room lists
830     SaveNewCount = NewRooms.ListCount
831     For a% = 1 To SaveNewCount
832         SaveNewRooms$(a%) = NewRooms.List(a% - 1)
833         Next a%
834     SaveOldCount = OldRooms.ListCount
835     For a% = 1 To SaveOldCount
836         SaveOldRooms$(a%) = OldRooms.List(a% - 1)
837         Next a%
838
839
840 End Sub
841
842 Private Sub goto_room(RoomName As String)
843
844     If begin_trans() = False Then GoTo skipgoto
845     If RoomName <> CurrRoomName$ Then LastMessageRead& = 0
846     serv_puts ("GOTO " + RoomName)
847     a$ = serv_gets()
848     Call end_trans
849
850     If (Left$(a$, 1) <> "2") Then
851         serv_puts ("GOTO" + "_BASEROOM_")
852         a$ = serv_gets()
853         End If
854
855     a$ = Right$(a$, Len(a$) - 4)
856     CurrRoomName$ = extract$(a$, 0)
857     CurrRoomFlags% = Val(extract$(a$, 4))
858     RoomPrompt.Caption = CurrRoomName$
859     button_abandon(0).Enabled = False
860
861     ' Enable file transfer commands only if we're in a directory room
862     If (CurrRoomFlags% And 32) = 32 Then
863         b = True
864     Else
865         b = False
866         End If
867
868     ' Enable some aide commands if user is the room aide
869     IsRoomAide% = False
870     If Val(extract$(a$, 8)) > 0 Then IsRoomAide% = True
871
872     menu_read_directory.Enabled = b
873     button_dir.Enabled = b
874     menu_aide_file.Enabled = (b And IsRoomAide%)
875     menu_read_file.Enabled = b
876     menu_enter_file.Enabled = b
877     menu_aide_edit.Enabled = IsRoomAide%
878     menu_aide_info.Enabled = IsRoomAide%
879     menu_aide_kill.Enabled = IsRoomAide%
880     menu_aide_whoknows.Enabled = IsRoomAide%
881
882     If (axlevel >= 6) Or (IsRoomAide% = True) Then
883         menu_aide.Enabled = True
884     Else
885         menu_aide.Enabled = False
886         End If
887
888     CurrRoom.Caption = CurrRoomName$
889     newmsgs% = Val(extract$(a$, 1))
890     MsgsCount.Caption = extract$(a$, 2) + " messages" + Chr$(13) + Chr$(10) + extract(a$, 1) + " new"
891
892     If (NewRooms.ListCount >= 0) Then
893         For c% = 0 To NewRooms.ListCount - 1
894             If NewRooms.List(c%) = CurrRoomName$ Then NewRooms.RemoveItem (c%)
895             Next
896         End If
897
898     If (OldRooms.ListCount >= 0) Then
899         For c% = 0 To OldRooms.ListCount - 1
900             If OldRooms.List(c%) = CurrRoomName$ Then OldRooms.RemoveItem (c%)
901             Next
902         End If
903
904     If (OldRooms.ListIndex = (-1)) And (NewRooms.ListIndex = (-1)) And NewRooms.ListCount > 0 Then
905         NewRooms.ListIndex = 0
906     Else
907         If (OldRooms.ListIndex = (-1)) And (NewRooms.ListIndex = (-1)) And OldRooms.ListCount > 0 Then
908             OldRooms.ListIndex = 0
909             End If
910         End If
911
912    If Val(extract$(a$, 3)) > 0 Then Call ReadRoomInfo(0)
913
914 skipgoto:
915
916 End Sub
917
918 Private Sub menu_aide_edit_Click()
919
920     Unload RoomPrompt
921     Load EditRoom
922
923 End Sub
924
925 Private Sub menu_aide_info_Click()
926
927     If begin_trans() = True Then
928         serv_puts ("EINF 0")
929         a$ = serv_gets()
930         Call end_trans
931         If Left$(a$, 1) = "2" Then
932             Unload RoomPrompt
933             Load EditInfo
934         Else
935             MsgBox Right$(a$, Len(a$) - 4), 16, "Error"
936             End If
937         End If
938
939 End Sub
940
941 Private Sub menu_aide_kill_Click()
942
943     q% = 2
944
945     If begin_trans() = True Then
946         serv_puts ("KILL 0")
947         a$ = serv_gets()
948         Call end_trans
949         End If
950
951     If Left$(a$, 1) = "2" Then
952         q% = MsgBox("Are you sure you want to delete '" + CurrRoomName$ + "'?", 33, CurrRoomName$)
953     Else
954         MsgBox Right$(a$, Len(a$) - 4), 16, "Error"
955         End If
956
957     If q% = 1 Then
958
959         If begin_trans() = True Then
960     
961             serv_puts ("KILL 1")
962             a$ = serv_gets()
963             Call end_trans
964             End If
965
966         If Left$(a$, 1) <> "2" Then
967             MsgBox Right$(a$, Len(a$) - 4), 16, "Error"
968         Else
969             Call goto_room("_BASEROOM_")
970             End If
971         End If
972
973 End Sub
974
975 Private Sub menu_aide_room_invite_Click()
976
977     Unload RoomPrompt
978     Load Invite
979
980 End Sub
981
982 Private Sub menu_aide_room_kick_Click()
983
984     Unload RoomPrompt
985     Load KickOut
986
987 End Sub
988
989 Private Sub menu_aide_valid_Click()
990
991     Unload RoomPrompt
992     Load Validation
993
994 End Sub
995
996 Private Sub menu_aide_whoknows_Click()
997
998     Unload RoomPrompt
999     Load WhoKnowsRoom
1000
1001 End Sub
1002
1003 Private Sub menu_enter_conf_Click()
1004     Unload RoomPrompt
1005     Load EnterConfiguration
1006 End Sub
1007
1008 Private Sub menu_enter_passwd_Click()
1009     Unload RoomPrompt
1010     Load EnterPassword
1011 End Sub
1012
1013 Private Sub menu_enter_regis_Click()
1014     Unload RoomPrompt
1015     Load Registration
1016 End Sub
1017
1018 Private Sub menu_enter_room_Click()
1019
1020     If begin_trans() = True Then
1021         serv_puts ("CRE8 0|0|0|0")
1022         a$ = serv_gets()
1023         Call end_trans
1024         If Left$(a$, 1) = "2" Then
1025             Unload RoomPrompt
1026             Load EnterRoom
1027         Else
1028             MsgBox Right$(a$, Len(a$) - 4), 16, "Error"
1029             End If
1030         End If
1031
1032 End Sub
1033
1034 Private Sub menu_help_about_Click()
1035
1036 n$ = Chr$(13) + Chr$(10)
1037 a$ = ""
1038 a$ = "Citadel/UX Client for Windows" + n$
1039 a$ = a$ + "Copyright © 1995 by Art Cancro" + n$
1040 a$ = a$ + "WinSock code Copyright © 1994 by Brian Syme" + n$
1041 a$ = a$ + n$
1042 a$ = a$ + "The home of Citadel/UX is UNCENSORED! BBS at 914-244-3252." + n$
1043 a$ = a$ + n$
1044 a$ = a$ + "THIS IS A PRELIMINARY AND UNFINISHED DISTRIBUTION" + n$
1045 a$ = a$ + "FOR DEMONSTRATION PURPOSES ONLY."
1046
1047 MsgBox a$
1048 End Sub
1049
1050 Private Sub menu_read_directory_click()
1051
1052     Unload RoomPrompt
1053     Load RoomDirectory
1054
1055
1056 End Sub
1057
1058 Private Sub menu_read_file_Click()
1059
1060     Unload RoomPrompt
1061     Load Download
1062
1063 End Sub
1064
1065 Private Sub menu_read_info_click()
1066
1067 Call ReadRoomInfo(1)
1068 End Sub
1069 Private Sub ReadRoomInfo(deliberate As Integer)
1070
1071 foundit = 0
1072     If begin_trans() = True Then
1073         serv_puts ("RINF")
1074         a$ = serv_gets()
1075         If Left$(a$, 1) = "1" Then
1076         foundit = 1
1077         i$ = ""
1078         Do
1079             a$ = serv_gets()
1080             If a$ <> "000" Then i$ = i$ + a$ + Chr$(13) + Chr$(10)
1081             Loop While a$ <> "000"
1082         Else
1083             i$ = "No info file available for this room."
1084             End If
1085         Call end_trans
1086         If foundit = 1 Or deliberate = 1 Then
1087             MsgBox Cit_Format(i$), 64, CurrRoomName$
1088             End If
1089         End If
1090
1091 End Sub
1092
1093 Private Sub menu_read_userlist_Click()
1094     Unload RoomPrompt
1095     Load UserList
1096 End Sub
1097
1098 Private Sub menu_term_quit_Click()
1099     
1100   
1101         If begin_trans() = True Then
1102          serv_puts ("QUIT")
1103          buf$ = serv_gets()
1104          Call end_trans
1105          End If
1106
1107     Unload RoomPrompt
1108     Unload IPC
1109     Load SelectBBS
1110         
1111 End Sub
1112
1113 Private Sub menu_term_stay_Click()
1114     Call button_terminate_click(0)
1115 End Sub
1116
1117 Private Sub NewRooms_Click()
1118
1119     a% = NewRooms.ListIndex
1120     OldRooms.ListIndex = (-1)
1121     NewRooms.ListIndex = a%
1122     
1123 End Sub
1124
1125 Private Sub NewRooms_DblClick()
1126
1127     If DoubleClickAction$ = "GOTO" Then Call button_goto_click(0)
1128     If DoubleClickAction$ = "SKIP" Then Call button_skip_click(0)
1129     If DoubleClickAction$ = "ABANDON" Then Call button_abandon_Click(0)
1130
1131
1132 End Sub
1133
1134 Private Sub NewRooms_KeyPress(keyascii As Integer)
1135
1136     If keyascii = 13 Or keyascii = 10 Then Call NewRooms_DblClick
1137
1138 End Sub
1139
1140 Private Sub OldRooms_Click()
1141     
1142     a% = OldRooms.ListIndex
1143     NewRooms.ListIndex = (-1)
1144     OldRooms.ListIndex = a%
1145
1146 End Sub
1147
1148 Private Sub OldRooms_DblClick()
1149     
1150     Call button_skip_click(0)
1151
1152 End Sub
1153
1154 Private Sub OldRooms_KeyPress(keyascii As Integer)
1155
1156     If keyascii = 13 Or keyascii = 10 Then Call OldRooms_DblClick
1157
1158 End Sub
1159
1160 Private Sub RefreshRoomLists()
1161
1162     ' First, clear out the saved rooms arrays...
1163     SaveNewCount = 0
1164     SaveOldCount = 0
1165
1166     ' Then, clear out the windows if there's anything there...
1167     OldRooms.Clear
1168     NewRooms.Clear
1169
1170     If begin_trans() = False Then GoTo skiproom
1171     serv_puts ("LKRN")
1172     buf$ = serv_gets()
1173     If Left$(buf$, 1) = "1" Then
1174         Do
1175             buf$ = serv_gets()
1176             If buf$ = "000" Then Exit Do
1177             NewRooms.AddItem (extract$(buf$, 0))
1178             Loop
1179         End If
1180
1181     serv_puts ("LKRO")
1182     buf$ = serv_gets()
1183     If Left$(buf$, 1) = "1" Then
1184         Do
1185             buf$ = serv_gets()
1186             If buf$ = "000" Then Exit Do
1187             OldRooms.AddItem (extract$(buf$, 0))
1188             Loop
1189         End If
1190     Call end_trans
1191 skiproom:
1192
1193 End Sub
1194