4 BackColor = &H00C0C0C0&
5 BorderStyle = 3 'Fixed Dialog
6 Caption = "Edit this room"
11 ClipControls = 0 'False
14 name = "MS Sans Serif"
20 strikethrough = 0 'False
22 ForeColor = &H80000008&
33 Begin VB.CheckBox check_ReadOnly
35 BackColor = &H00C0C0C0&
36 Caption = "Read-only room"
37 ForeColor = &H80000008&
44 Begin VB.TextBox DirName
47 BackColor = &H00C0C0C0&
50 name = "MS Sans Serif"
56 strikethrough = 0 'False
65 Begin Threed.SSFrame Frame3D9
75 Caption = "Other options"
77 Begin VB.CheckBox check_netroom
79 BackColor = &H00C0C0C0&
80 Caption = "Network shared room"
81 ForeColor = &H80000008&
89 Begin Threed.SSFrame Frame3D8
99 Caption = "Anonymous messages"
101 Begin VB.OptionButton radio_anonoption
103 BackColor = &H00C0C0C0&
104 Caption = "Prompt users for anonymity"
105 ForeColor = &H80000008&
112 Begin VB.OptionButton radio_anononly
114 BackColor = &H00C0C0C0&
115 Caption = "All messages anonymous"
116 ForeColor = &H80000008&
123 Begin VB.OptionButton radio_noAnon
125 BackColor = &H00C0C0C0&
126 Caption = "No anonymous messages"
127 ForeColor = &H80000008&
135 Begin VB.TextBox RoomAide
136 Alignment = 2 'Center
138 BackColor = &H00C0C0C0&
139 BorderStyle = 0 'None
141 name = "MS Sans Serif"
147 strikethrough = 0 'False
156 Begin Threed.SSFrame Frame3D7
166 Caption = "Room Aide"
169 Begin Threed.SSFrame Frame3D6
179 Caption = "Directory name"
182 Begin Threed.SSFrame Frame3D5
192 Caption = "Directory options"
194 Begin VB.CheckBox check_visdir
196 BackColor = &H00C0C0C0&
197 Caption = "Visible directory"
198 ForeColor = &H80000008&
205 Begin VB.CheckBox check_download
207 BackColor = &H00C0C0C0&
208 Caption = "Downloading allowed"
209 ForeColor = &H80000008&
216 Begin VB.CheckBox check_uploading
218 BackColor = &H00C0C0C0&
219 Caption = "Uploading allowed"
220 ForeColor = &H80000008&
227 Begin VB.CheckBox check_directory
229 BackColor = &H00C0C0C0&
230 Caption = "Enable as a directory room"
231 ForeColor = &H80000008&
239 Begin Threed.SSFrame Frame3D4
249 Caption = "Access options"
251 Begin VB.CheckBox CurrForget
253 BackColor = &H00C0C0C0&
254 Caption = "Cause users to forget room"
255 ForeColor = &H80000008&
262 Begin VB.CheckBox PrefOnly
264 BackColor = &H00C0C0C0&
265 Caption = "Preferred users only"
266 ForeColor = &H80000008&
274 Begin Threed.SSFrame PWframe
286 Begin VB.TextBox Password
287 Alignment = 2 'Center
289 BackColor = &H00C0C0C0&
290 BorderStyle = 0 'None
292 name = "MS Sans Serif"
298 strikethrough = 0 'False
308 Begin Threed.SSFrame Frame3D2
320 Begin VB.OptionButton radio_invonly
322 BackColor = &H00C0C0C0&
323 Caption = "Invitation only"
324 ForeColor = &H80000008&
331 Begin VB.OptionButton radio_passworded
333 BackColor = &H00C0C0C0&
334 Caption = "Accessible using a password"
335 ForeColor = &H80000008&
342 Begin VB.OptionButton radio_guessname
344 BackColor = &H00C0C0C0&
345 Caption = "Accessible by guessing room name"
346 ForeColor = &H80000008&
353 Begin VB.OptionButton radio_public
355 BackColor = &H00C0C0C0&
357 ForeColor = &H80000008&
365 Begin VB.CommandButton cancel_button
367 BackColor = &H80000005&
375 Begin VB.CommandButton save_button
377 BackColor = &H80000005&
385 Begin Threed.SSFrame Frame3D1
395 Caption = "Room Name"
397 Begin VB.TextBox RoomName
398 Alignment = 2 'Center
400 BackColor = &H00C0C0C0&
401 BorderStyle = 0 'None
403 name = "MS Sans Serif"
409 strikethrough = 0 'False
420 Attribute VB_Name = "EditRoom"
421 Attribute VB_Creatable = False
422 Attribute VB_Exposed = False
425 Private Sub cancel_button_Click()
430 Private Sub check_directory_Click()
431 If check_directory.Value = 1 Then
432 check_uploading.Enabled = True
433 check_download.Enabled = True
434 check_visdir.Enabled = True
435 DirName.Enabled = True
437 check_uploading.Enabled = False
438 check_download.Enabled = False
439 check_visdir.Enabled = False
440 DirName.Enabled = True
445 Private Sub DirName_Change()
447 If Len(DirName.Text) > 14 Then DirName.Text = Left$(DirName.Text, 14)
451 Private Sub Form_Load()
453 EditRoom.WindowState = 0
454 EditRoom.Top = Int((MainWin.Height - EditRoom.Height) / 3)
455 EditRoom.Left = Int((MainWin.Width - EditRoom.Width) / 2)
460 If begin_trans() = True Then
467 If Left$(a$, 1) <> "2" Then GoTo no_access
468 a$ = Right$(a$, Len(a$) - 4)
469 RoomName.Text = extract$(a$, 0)
470 Password.Text = extract$(a$, 1)
471 DirName.Text = extract$(a$, 2)
472 roomFlags& = Val(extract$(a$, 3))
474 If Left$(b$, 1) = "2" Then
475 b$ = Right$(b$, Len(b$) - 4)
476 RoomAide.Text = extract$(b$, 0)
481 pr& = roomFlags& And 4 ' Private
482 gn& = roomFlags& And 16 ' GuessName
483 pw& = roomFlags& And 8 ' Passworded
485 Radio_Public.Value = False
486 Radio_Guessname.Value = False
487 Radio_Passworded.Value = False
488 Radio_InvOnly.Value = False
490 If pr& = 0 Then Radio_Public.Value = True
491 If pr& = 4 And gn& = 16 Then Radio_Guessname.Value = True
492 If pr& = 4 And pw& = 8 Then
493 Radio_Passworded.Value = True
494 Password.Enabled = True
496 Password.Enabled = False
498 If pr& = 4 And gn& = 0 And pw& = 0 Then Radio_InvOnly.Value = True
500 If roomFlags& And 4096 Then
506 If roomFlags& And 2048 Then
507 check_netroom.Value = 1
509 check_netroom.Value = 0
512 If roomFlags& And 32 Then
513 check_directory.Value = 1
514 check_uploading.Enabled = True
515 check_download.Enabled = True
516 check_visdir.Enabled = True
517 DirName.Enabled = True
519 check_directory.Value = 0
520 check_uploading.Enabled = False
521 check_download.Enabled = False
522 check_visdir.Enabled = False
523 DirName.Enabled = True
525 check_uploading.Value = (roomFlags& And 64) / 64
526 check_download.Value = (roomFlags& And 128) / 128
527 check_visdir.Value = (roomFlags& And 256) / 256
529 If roomFlags& And 512 Then Radio_AnonOnly.Value = True
530 If roomFlags& And 1024 Then Radio_AnonOption.Value = True
531 If (roomFlags& And (512 Or 1024)) = 0 Then radio_NoAnon.Value = True
533 check_readonly.Value = (roomFlags& And 8192) / 8192
535 save_button_enabled = True
539 save_button.Enabled = False
540 MsgBox Right$(a$, Len(a$) - 4), 16, "Error"
545 Private Sub Password_Change()
546 If Len(Password.Text) > 9 Then Password.Text = Left$(Password.Text, 9)
549 Private Sub radio_guessname_Click()
550 If Radio_Public.Value = False Then
551 CurrForget.Enabled = True
554 CurrForget.Enabled = False
559 Private Sub radio_invonly_Click()
560 If Radio_Public.Value = False Then
561 CurrForget.Enabled = True
564 CurrForget.Enabled = False
569 Private Sub radio_passworded_Click()
571 pwframe.Enabled = Radio_Passworded.Value
572 Password.Enabled = Radio_Passworded.Value
573 If Radio_Public.Value = False Then
574 CurrForget.Enabled = True
577 CurrForget.Enabled = False
582 Private Sub radio_public_Click()
584 If Radio_Public.Value = False Then
585 CurrForget.Enabled = True
588 CurrForget.Enabled = False
593 Private Sub RoomName_Change()
595 If Len(RoomName.Text) > 19 Then RoomName.Text = Left$(RoomName.Text, 19)
599 Private Sub save_button_Click()
603 roomFlags& = roomFlags& Or 4 Or 8 Or 16
604 If Radio_Public.Value = True Then roomFlags& = roomFlags& - 4 - 8 - 16
605 If Radio_Guessname.Value = True Then roomFlags& = roomFlags& - 8
606 If Radio_Passworded.Value = True Then roomFlags& = roomFlags& - 16
607 If Radio_InvOnly.Value = True Then roomFlags& = roomFlags& - 8 - 16
609 roomFlags& = (roomFlags& Or 32 Or 64 Or 128 Or 256) - 32 - 64 - 128 - 256
610 roomFlags& = roomFlags& Or (check_directory.Value * 32)
611 roomFlags& = roomFlags& Or (check_uploading.Value * 64)
612 roomFlags& = roomFlags& Or (check_download.Value * 128)
613 roomFlags& = roomFlags& Or (check_visdir.Value * 256)
615 roomFlags& = (roomFlags& Or 512 Or 1024) - 512 - 1024
616 If Radio_AnonOnly.Value = True Then roomFlags& = roomFlags& Or 512
617 If Radio_AnonOption.Value = True Then roomFlags& = roomFlags& Or 1024
619 roomFlags& = (roomFlags& Or 2048) - 2048
620 roomFlags& = roomFlags& Or (check_netroom.Value * 2048)
622 roomFlags& = (roomFlags& Or 4096) - 4096
623 roomFlags& = roomFlags& Or (PrefOnly.Value * 4096)
625 roomFlags& = (roomFlags& Or 8192) - 8192
626 roomFlags& = roomFlags& Or (check_readonly.Value * 8192)
628 If begin_trans() = True Then
630 rf$ = Str$(roomFlags&)
631 rf$ = Right$(rf$, Len(rf$) - 1)
632 cf$ = Str$(CurrForget.Value)
633 cf$ = Right$(cf$, Len(cf$) - 1)
634 a$ = "SETR " + RoomName.Text + "|" + Password.Text + "|" + DirName.Text + "|" + rf$ + "|" + cf$
638 serv_puts ("SETA " + RoomAide.Text)
642 If Left$(a$, 1) <> "2" Then
644 MsgBox Right$(a$, Len(a$) - 4), 16, "Error"
646 CurrRoomName$ = RoomName.Text
649 If Left$(b$, 1) <> "2" Then
651 MsgBox Right$(b$, Len(b$) - 4), 16, "Error"
655 If unload_ok% = 1 Then