-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.src
940 lines (781 loc) · 12.9 KB
/
default.src
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
# default.src
# Default Command Shell for Synchronet Version 2.00a+
# $Id: default.src,v 1.28 2020/04/23 02:46:08 rswindell Exp $
# @format.tab-size 8, @format.use-tabs true
###############################################################################
# This shell is an imitation of the Version 1c command set/structure #
# #
# It also serves as an example of a complex command shell using the Baja #
# command shell language #
# #
###############################################################################
# Tips:
#
# Tabstops should be set to 8 to view/edit this file
# If your editor does not support control characters,
# use \1 for Ctrl-A codes
# All lines starting with # are considered comments and are ignored
# Left margins (indents) are not relevant and used only for clarity
# Almost everything is not case sensitive with the exception of @-codes
################################# Begins Here #################################
!include sbbsdefs.inc
# Set return point for main menu commands (via end_cmd)
cmd_home
# Display TEXT\MENU\MAIN.* if not in expert mode
compare_user_misc UM_EXPERT
if_false
cls
menu main
end_if
# Update node status
node_action node_main
async
inc_main_cmds
compare_ars RIP
if_true
getlines
end_if
# Display main Prompt
print "\1-\1c\r\nþ \1b\1hMain \1n\1cþ \1h"
compare_ars exempt T
if_true
print "@TUSED@"
else
print "@TLEFT@"
end_if
print " \1n\1c[\1h@GN@\1n\1c] @GRP@\1\\ [\1h@SN@\1n\1c] @SUB@: \1n"
# Get key (with / extended commands allowed)
compare_user_misc UM_COLDKEYS
if_false
getkeye
else
getstrupr 60
endif
# Do nothing for control keys and space
cmdkey ^@
end_cmd
cmdkey ^M
end_cmd
cmdkey ^S
end_cmd
cmdkey "
end_cmd
# Write command to log file
logkey_comma
# Hitting number changes current sub-board
cmdkey digit
compare_user_misc UM_COLDKEYS
if_false
ungetkey
end_if
msg_get_sub_num
end_cmd
# Hitting /number changes current group
cmdkey edigit
compare_user_misc UM_COLDKEYS
if_false
ungetkey
else
shift_str 1
end_if
msg_get_grp_num
end_cmd
# Show the key hit
compare_user_misc UM_COLDKEYS
if_false
printkey
endif
# Next sub-board
cmdkey ^^
msg_subboard_up
end_cmd
cmdkey >
msg_subboard_up
end_cmd
cmdkey }
msg_subboard_up
end_cmd
cmdkey )
msg_subboard_up
end_cmd
cmdkey +
msg_subboard_up
end_cmd
cmdkey =
msg_subboard_up
end_cmd
# Previous sub-board
cmdkey ^J
msg_subboard_down
end_cmd
cmdkey <
msg_subboard_down
end_cmd
cmdkey {
msg_subboard_down
end_cmd
cmdkey (
msg_subboard_down
end_cmd
cmdkey -
msg_subboard_down
end_cmd
# Next group
cmdkey ^F
msg_group_up
end_cmd
cmdkey ]
msg_group_up
end_cmd
# Previous group
cmdkey ^]
msg_group_down
end_cmd
cmdkey [
msg_group_down
end_cmd
# String commands start with a semicolon
cmdkey ;
compare_user_misc UM_COLDKEYS
if_true
shift_str 1
else
getstr 40
end_if
exec_bin "str_cmds %s"
end_cmd
cmdkey T
chkfile "%zmenu/tmessage.*"
if_true
menu tmessage
end_if
call file_transfers
end_cmd
compare_user_misc UM_COLDKEYS
if_false
crlf
end_if
pause_reset
# Menu
cmdkey ?
compare_user_misc UM_expert
if_true
menu main
end_if
end_cmd
# Sysop Menu
compare_ars SYSOP or EXEMPT Q or I or N
if_true
cmdkey !
menu sysmain
end_cmd
end_if
# Commands
cmdkey A
auto_message
end_cmd
cmdkey /A
compare_ars ANSI and not GUEST
if_false
print "\r\nSorry, only regular users with ANSI terminals can do that.\r\n"
else
print "Selecting your avatar..."
exec_bin avatar_chooser
# an alternative approach (uses the configured xtrn/door):
# exec_xtrn avatchoo
end_if
end_cmd
cmdkey B
print "\r\n\1c\1hBrowse/New Message Scan\r\n"
msg_browse_scan
end_cmd
cmdkey C
exec_bin chat_sec
end_cmd
cmdkey D
user_defaults
exec_bin "termsetup"
end_cmd
cmdkey E
exec_bin email_sec
end_cmd
cmdkey F
print "\r\n\1c\1hFind Text in Messages\r\n"
msg_find_text
end_cmd
cmdkey /F
msg_find_text_all
end_cmd
cmdkey G
text_file_section
end_cmd
cmdkey I
call main_info
end_cmd
cmdkey J
msg_select_area
end_cmd
cmdkey L
msg_list
end_cmd
cmdkey /L
nodelist_all
end_cmd
cmdkey W
nodelist_users
end_cmd
cmdkey M
minute_bank
end_cmd
cmdkey N
print "\r\n\1c\1hNew Message Scan\r\n"
msg_new_scan
end_cmd
cmdkey /N
msg_new_scan_all
end_cmd
cmdkey O
file_download_batch
if_true
end_cmd
end_if
logoff
end_cmd
cmdkey /O
file_download_batch
if_true
end_cmd
end_if
logoff_fast
end_cmd
cmdkey P
msg_post
end_cmd
cmdkey /P
exec_bin postpoll
end_cmd
cmdkey Q
msg_qwk
end_cmd
cmdkey R
msg_read
end_cmd
cmdkey S
print "\r\n\1c\1hScan for Messages Posted to You\r\n"
msg_your_scan
end_cmd
cmdkey /S
msg_your_scan_all
end_cmd
cmdkey U
print "\r\n\1c\1hList Users\r\n"
mnemonics "\r\n~Logons Today, ~Yesterday, ~Sub-board, or ~All: "
getcmd LSAY\r
cmdkey L
userlist_logons
end_cmd
cmdkey Y
exec_bin "logonlist -y"
end_cmd
cmdkey S
userlist_sub
end_cmd
cmdkey A
userlist_all
end_cmd
# fall-through for CR, Ctrl-C, etc
end_cmd
cmdkey /U
userlist_all
end_cmd
cmdkey V
exec_bin scanpolls
end_cmd
cmdkey /V
exec_bin scanpolls all
end_cmd
cmdkey X
xtrn_section
end_cmd
cmdkey Z
print "\r\n\1c\1hContinuous New Message Scan\r\n"
msg_cont_scan
end_cmd
cmdkey /Z
msg_cont_scan_all
end_cmd
cmdkey *
msg_show_subboards
end_cmd
cmdkey /*
msg_show_groups
end_cmd
cmdkey &
call main_cfg
end_cmd
cmdkey #
print "\r\n\1c\1hType the actual number, not the symbol.\r\n"
end_cmd
cmdkey /#
print "\r\n\1c\1hType the actual number, not the symbol.\r\n"
end_cmd
# fall through
print "\r\n\1c\1hUnrecognized command."
compare_user_misc UM_expert
if_true
print " Hit '\1i?\1n\1c\1h' for a menu."
end_if
crlf
end_cmd
# shouldn't hit next line
print "Problem in command shell."
pause
hangup
return
############################ Main Info Section ###############################
:main_info
cmd_home
compare_user_misc UM_expert
if_false
menu maininfo
end_if
async
print "\r\n\1y\1hInfo: \1n"
getcmd ?QISVY\r
logkey
cmdkey ?
compare_user_misc UM_expert
if_true
menu maininfo
end_if
end_cmd
cmdkey I
info_system
end_cmd
cmdkey S
info_subboard
end_cmd
cmdkey Y
info_user
end_cmd
cmdkey V
info_version
end_cmd
cmdkey Q
cmd_pop
return
end_cmd
cmd_pop
return
########################### Main Config Section ##############################
:main_cfg
compare_user_misc UM_expert
if_false
menu maincfg
end_if
async
print "\r\n\1y\1hConfig: \1n"
getcmd ?QNPIS\r
logkey
cmdkey ?
compare_user_misc UM_expert
if_true
menu maincfg
end_if
goto main_cfg
end_cmd
cmdkey N
msg_new_scan_cfg
return
end_cmd
cmdkey S
msg_your_scan_cfg
return
end_cmd
cmdkey P
msg_ptrs_cfg
return
end_cmd
cmdkey I
msg_ptrs_reinit
return
end_cmd
return
########################### File Transfer Section #############################
:file_transfers
compare_ars file_cmds=0
if_true
compare_user_misc UM_ask_nscan
if_true
crlf
crlf
yes_no "Search all libraries for new files"
if_true
file_new_scan_all
end_if
end_if
end_if
cmd_home
compare_user_misc UM_expert
if_false
cls
menu transfer
end_if
# Update node status
node_action node_xfer
async
inc_file_cmds
# Display main Prompt
print "\1-\1c\r\nþ \1b\1hFile \1n\1cþ \1h"
compare_ars exempt T
if_true
print "@TUSED@"
else
print "@TLEFT@"
end_if
print " \1n\1c(\1h@LN@\1n\1c) @LIB@\1\\ (\1h@DN@\1n\1c) @DIR@: \1n"
# Get key (with / extended commands allowed)
compare_user_misc UM_COLDKEYS
if_false
getkeye
else
getstrupr 60
endif
compare_ars RIP
if_true
getlines
end_if
# Do nothing for control keys and space
cmdkey ^@
end_cmd
cmdkey ^M
end_cmd
cmdkey ^S
end_cmd
cmdkey "
end_cmd
# Write command to log file
logkey_comma
# Hitting number changes current sub-board
cmdkey digit
compare_user_misc UM_COLDKEYS
if_false
ungetkey
end_if
file_get_dir_num
end_cmd
# Hitting /number changes current group
cmdkey edigit
compare_user_misc UM_COLDKEYS
if_false
ungetkey
else
shift_str 1
end_if
file_get_lib_num
end_cmd
# Show the key hit
compare_user_misc UM_COLDKEYS
if_false
printkey
endif
# Next directory
cmdkey ^^
file_directory_up
end_cmd
cmdkey >
file_directory_up
end_cmd
cmdkey }
file_directory_up
end_cmd
cmdkey )
file_directory_up
end_cmd
cmdkey +
file_directory_up
end_cmd
cmdkey =
file_directory_up
end_cmd
# Previous directory
cmdkey ^J
file_directory_down
end_cmd
cmdkey <
file_directory_down
end_cmd
cmdkey {
file_directory_down
end_cmd
cmdkey (
file_directory_down
end_cmd
cmdkey -
file_directory_down
end_cmd
# Next library
cmdkey ^F
file_library_up
end_cmd
cmdkey ]
file_library_up
end_cmd
# Previous library
cmdkey ^]
file_library_down
end_cmd
cmdkey [
file_library_down
end_cmd
# String commands start with a semicolon
cmdkey ;
compare_user_misc UM_COLDKEYS
if_true
shift_str 1
else
getstr 40
end_if
exec_bin "str_cmds %s"
end_cmd
cmdkey Q
cmd_pop
return
end_cmd
compare_user_misc UM_COLDKEYS
if_false
crlf
end_if
pause_reset
# Menu
cmdkey ?
compare_user_misc UM_expert
if_true
menu transfer
end_if
end_cmd
# Sysop Menu
compare_ars SYSOP
if_true
cmdkey !
menu sysxfer
end_cmd
end_if
# Commands
cmdkey B
file_batch_section
end_cmd
cmdkey C
exec_bin chat_sec
end_cmd
cmdkey D
print "\r\n\1c\1hDownload File(s)\r\n"
file_download_batch
if_true
end_cmd
end_if
getfilespec
if_true
file_download
end_if
end_cmd
cmdkey /D
print "\r\n\1c\1hDownload File(s) from User(s)\r\n"
file_download_user
end_cmd
cmdkey E
print "\r\n\1c\1hList Extended File Information\r\n"
getfilespec
if_true
file_list_extended
end_if
end_cmd
cmdkey F
print "\r\n\1c\1hFind Text in File Descriptions (no wildcards)\r\n"
file_find_text
end_cmd
cmdkey /F
file_find_text_all
end_cmd
cmdkey I
call file_info
end_cmd
cmdkey J
file_select_area
end_cmd
cmdkey L
setstr *.*
file_list
end_cmd
cmdkey /L
nodelist_all
end_cmd
cmdkey W
nodelist_users
end_cmd
cmdkey N
print "\r\n\1c\1hNew File Scan\r\n"
file_new_scan
end_cmd
cmdkey /N
file_new_scan_all
end_cmd
cmdkey O
file_download_batch
if_true
end_cmd
end_if
logoff
end_cmd
cmdkey /O
file_download_batch
if_true
end_cmd
end_if
logoff_fast
end_cmd
cmdkey R
print "\r\n\1c\1hRemove/Edit File(s)\r\n"
getfilespec
if_true
file_remove
end_if
end_cmd
cmdkey S
print "\r\n\1c\1hSearch for Filename(s)\r\n"
file_find_name
end_cmd
cmdkey /S
file_find_name_all
end_cmd
cmdkey T
file_temp_section
end_cmd
cmdkey U
print "\r\n\1c\1hUpload File\r\n"
chkfile "%zmenu/upload.*"
if_true
menu upload
end_if
file_upload
end_cmd
cmdkey /U
print "\r\n\1c\1hUpload File to User\r\n"
file_upload_user
end_cmd
cmdkey V
print "\r\n\1c\1hView File(s)\r\n"
getfilespec
if_true
file_view
end_if
end_cmd
cmdkey Z
print "\r\n\1c\1hUpload File to Sysop\r\n"
file_upload_sysop
end_cmd
cmdkey *
file_show_directories
end_cmd
cmdkey /*
file_show_libraries
end_cmd
cmdkey &
:xfercfg
compare_user_misc UM_expert
if_false
menu xfercfg
end_if
async
print "\r\n\1y\1hConfig: \1n"
getcmd ?QBEP\r
logkey
cmdkey ?
compare_user_misc UM_expert
if_true
menu xfercfg
end_if
goto xfercfg
end_cmd
cmdkey P
file_ptrs_cfg
end_cmd
cmdkey B
crlf
toggle_user_misc UM_BATCHFLAG
compare_user_misc UM_BATCHFLAG
print "Batch flagging in file listings is now: \1h"
if_true
print "ON"
else
print "OFF"
end_if
crlf
end_cmd
cmdkey E
crlf
toggle_user_misc UM_EXTDESC
compare_user_misc UM_EXTDESC
print "Extended file description display is now: \1h"
if_true
print "ON"
else
print "OFF"
end_if
crlf
end_cmd
end_cmd
cmdkey #
print "\r\n\1c\1hType the actual number, not the symbol.\r\n"
end_cmd
cmdkey /#
print "\r\n\1c\1hType the actual number, not the symbol.\r\n"
end_cmd
# fall through
print "\r\n\1c\1hUnrecognized command."
compare_user_misc UM_expert
if_true
print " Hit '\1i?\1n\1c\1h' for a menu."
end_if
crlf
end_cmd
# shouldn't hit next line
print "Problem in command shell."
pause
hangup
############################ File Info Section ###############################
:file_info
cmd_home
compare_user_misc UM_expert
if_false
menu xferinfo
end_if
async
print "\r\n\1y\1hInfo: \1n"
getcmd ?TYDUQ\r
logkey
cmdkey ?
compare_user_misc UM_expert
if_true
menu xferinfo
end_if
end_cmd
cmdkey T
info_xfer_policy
end_cmd
cmdkey Y
info_user
end_cmd
cmdkey D
info_directory
end_cmd
cmdkey U
userlist_dir
end_cmd
cmdkey Q
cmd_pop
return
end_cmd
cmd_pop
return
#end of DEFAULT.SRC