File: manual.html

package info (click to toggle)
linpac 0.16pre3-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,328 kB
  • ctags: 2,582
  • sloc: cpp: 16,514; sh: 7,991; ansic: 4,061; makefile: 211; perl: 101
file content (1055 lines) | stat: -rw-r--r-- 47,350 bytes parent folder | download
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
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="GENERATOR" content="Mozilla/4.7 [en] (X11; I; Linux 2.2.17 i586) [Netscape]">
   <meta name="Author" content="Radek Burget">
   <title>LinPac User Manual</title>
</head>
<body>

<center>
<h1>
LinPac - Packet Radio Terminal for Linux<br>

<hr WIDTH="100%"></h1></center>

<center>Version 0.16
<p>(c) 1998 - 2001 by Radek Burget OK2JBG</center>

<br>&nbsp;
<center>
<h2>
User manual</h2></center>
<b>Contents</b>
<p>1 <a href="#POS1">What is LinPac</a>
<p>2 <a href="#POS2">First configuration</a>
<p>3 <a href="#POS3">LinPac controls</a>
<br>3.1 <a href="#POS3_1">Keyboard</a>
<br>3.2 <a href="#POS3_2">Entering commands</a>
<br>3.3 <a href="#POS3_3">Initiating the connection</a>
<br>3.4 <a href="#POS3_4">Receiving and sending files</a>
<br>3.5 <a href="#POS3_5">Remote commands</a>
<br>3.6 <a href="#POS3_6">Character encoding</a>
<br>3.7 <a href="#POS3_7">Huffman compression</a>
<p>4 <a href="#POS4">Variables</a>
<br>4.1 <a href="#POS4_1">Special variables</a>
<p>5 <a href="#POS5">Station database</a>
<br>5.1 <a href="#POS5_1">The station.data file format</a>
<br>5.2 <a href="#POS5_2">The 'Name' command</a>
<br>5.3 <a href="#POS5_3">Using the database</a>
<p>6 <a href="#POS6">About macros</a>
<br>6.1 <a href="#POS6_1">Creating macros</a>
<br>6.2 <a href="#POS6_2">Commands used in macros</a>
<br>6.3 <a href="#POS6_3">Special system macros</a>
<p>7 <a href="#POS7">Creating new commands</a>
<p>8 <a href="#POS8">Standard applications</a>
<br>8.1 <a href="#POS8_1">File transfer protocols</a>
<br>8.2 <a href="#POS8_2">Automatic password generation</a>
<br>8.2.1 <a href="#POS8_2_1">Login passwords</a>
<br>8.2.2 <a href="#POS8_2_2">Sysop and general use passwords</a>
<br>8.3 <a href="#POS8_3">Utilities for mail exchange</a>
<br>8.4 <a href="#POS8_4">Mail client</a>
<br>8.5 <a href="#POS8_5">Logbook</a>
<p>9 <a href="#POS9">Command line options</a>
<p>10 <a href="#POS10">Copying</a>
<p>Appendix A: <a href="#POSAppendixA">List of LinPac commands</a>
<p><a NAME="POS1"></a>
<h2>
1 What is LinPac</h2>
LinPac is an attempt to create the packet radio terminal for Linux that
allows wide configurability and easy addition of new functions and special
functions needed by the user. The aim was to minimize the amount of 'hard
coded' functions and create the complete set of applications that can be
easy expanded and/or completely reconfigured.
<p>All functions described in this manual agree with the standard configuration
that comes with the distribution package.
<p><a NAME="POS2"></a>
<h2>
2 First configuration</h2>
When linpac is started for the first time, it automaticaly creates the
directory called <tt>LinPac</tt> in your home directory. This directory
contains your personal LinPac configuration. When creating this directory
LinPac asks for basic information and prepares a useable configuration
for you.
<p>LinPac functions are based on the very simple interpreted language (actually
it's not a language, it's something like the batch files in DOS). In the
LinPac home directory there is the subdirectory 'macro', that contains
all the scripts written in this language, let's call them macros. Each
macro can be run in LinPac and it implements some action. The simplest
case of the macro is normal text file, that is just printed to the screen
(or sent to the peer) when executed. The language is described in <a href="#POS6">chapter
6</a>.
<p>There is a macro called <tt>init.mac</tt> in the <tt>macro</tt> directory.
This macro is executed each time LinPac is started and contains the commands
to setup the callsigns and other settings. You can modify this file to
change the initial configuration of LinPac.
<p>You may also want to change following files:
<p><b>ctext.mac</b> - this file is executed when the peer connects and
should contain the greeting text
<br><b>quit.mac</b> - this is called when user enters the Quit command
(end of connection). It should print some farewell and disconnect.
<br><b>info.mac</b> - contains the information about your system
<p>After this you should be able to make your first connection.
<p><a NAME="POS3"></a>
<h2>
3 LinPac controls</h2>
After running LinPac the main screen apears. In the standard configuraion
it's divided to five parts (described from top of the screen to bottom):
<ul>
<li>
<b>QSO window</b>: this window contains the text that came from the peer
and also the sent text and some special messages (different text colours).</li>

<li>
<b>Status line</b>: displays your callsign, current time and some information
about the current connection.</li>

<li>
<b>Editor</b>: allows you to enter the text you want to send to the peer
or the commands you want to execute</li>

<li>
<b>Channel list</b>: displays the list of channels whith the callsign of
connected users. The currently selected channel is highlighted.</li>

<li>
<b>Monitor </b>: displays the traffic on your radio ports</li>
</ul>
LinPac is mostly driven by commands. The commands are entered using the
editor and must start with the colon (':') in the first column. Lines that
don't begin with the colon are sent to the peer.
<p>LinPac allows to make eight connections simultaneously. For each connection
one channel is used. You can switch between channels by pressing the F1
- F8 keys. Each has its own QSO window, status line and the editor. The
channel list and the monitor are common for all the channles.
<p>There is a special channel invoked by presing F10. This channel has
no QSO window and doesn't allow to make a connection. The text written
is sent out immediately using UI frames (beacon).
<p><a NAME="POS3_1"></a>
<h3>
3.1 Keyboard</h3>
Following list contains the important shortcuts:
<p><b><u>Global</u></b>
<br><b>F1 - F8</b> : switch to channel 1 - 8
<br><b>F10</b> : switch to monitor
<br><b>Alt-X</b> : end of LinPac
<p><b><u>QSO Window</u></b>
<br><b>PgUp</b>, <b>PgDn</b>, <b>ctrl-R</b>, <b>ctrl-V</b> : scroll one
page up / down
<br><b>ctrl-E</b>, <b>ctrl-X</b> : scroll one line up / down
<br><b>ctrl-B</b> : skip to end of buffer
<p><b><u>Editor</u></b>
<br><b>Cursor keys</b>, <b>Home</b>, <b>End</b>, <b>Backspace</b>, <b>Del</b>
: text editing
<br><b>ctrl-Y</b> : delete current line
<br><b>Enter</b> : send current line
<p>Some applications (e.g. mailer) can use the whole screen. On each channel
can run only one such application at the same time. It's possible to switch
to this application using <b>Alt-&lt;<i>channel_number</i>></b> (e.g. Alt-5)
and switch back to terminal using <b>F1</b> - <b>F10</b>.
<p><a NAME="POS3_2"></a>
<h3>
3.2 Entering commands</h3>
Each command is called using its name. Some commands can be abbreviated.
In this manual the mandatory part is always written by capital letters.
The rest is optional. Some commands require some extra arguments. The arguments
are written behind the command and are seperated by one or more spaces.
If you want to enter the argument containing more than one word, the argument
must be entered in quotation marks.
<p>Example:
<br><tt>:color red blue</tt> - calls the 'color' command with two arguments
- 'red' and 'blue'
<br><tt>:color 'light red'</tt> or
<br><tt>:color "light red"</tt> - calls the 'color' command with one argument
'light red'
<p>Most of the command work on the currently selected channel. If you want
to execute the command on some other channel, you can enter the number
of the channel this way:
<p><tt>:connect@5 OK0PAB</tt>
<p>In this case the 'connect' command is executed on channel 5.
<p>The complete list of commands with descriptions is available in Appendix
A.
<p><a NAME="POS3_3"></a>
<h3>
3.3 Initiating the connection</h3>
To initiate the connection the <tt>:Connect </tt>command is used. Just
switch to the channel you want to use by pressing <b>F1</b> - <b>F8 </b>and
enter the following command:
<p><tt>:connect <i>CALLSIGN</i></tt>
<p>Replace the <i>CALLSIGN</i> with the real callsign of the station you
want to connect. The command can be abbteviated to the first leter only.
Example:
<p><tt>:c OK0PAB</tt>
<p>This command will initiate the connecting sequence to OK0PAB. When your
systems contains more than one radio port, you can specify its name before
the callsign like this:
<p><tt>:c 2:OK0PAB</tt>
<p>This command will try to connect OK0PAB via port 2. When no port name
is used, the default one is considered. At the begining the default port
is the first port in the axports file. If you want to change the default
port, just use the command <tt>:port</tt>.
<p><tt>:port 2</tt>
<p>This will change the default port name to '2'.
<p>The <tt>:Disconnect </tt>command is used to close the connection. It
can be abbreviated to ':d'.
<p><a NAME="POS3_4"></a>
<h3>
3.4 Receiving and sending files</h3>
The standard distrubution can receive files using plain text or binary
transfer and using file transfers protocols YAPP and Autobin. LinPac will
automaticaly start to receive the file when the peer begins to send using
the YAPP or Autobin protocols. The 7+ files are automaticaly saved too.
When you want to save the incomming text you have to use the command
<p><tt>:Write &lt;<i>filename</i>></tt>
<p>The incomming text will be saved until you stop the saving using
<p><tt>:Write off</tt>
<p>For receiving the plain binary file corresponding command <tt>:WBin</tt>
can be used. This way of transfering binary files is not recommended, use
the autobin or yapp protocol instead.
<p>There are following commands available for sending files:
<p><tt>:rprg &lt;<i>filename</i>></tt> - sends the file using the Autobin
protocol
<br><tt>:yput &lt;<i>filename</i>></tt> - sends the file using the YAPP
protocol
<br><tt>:rbin &lt;<i>filename</i>></tt> - sends the binary file (no protocol
- not recommended)
<br><tt>:read &lt;<i>filename</i>></tt> - semds the text file
<p><a NAME="POS3_5"></a>
<h3>
3.5 Remote commands</h3>
LinPac allows the remote user to enter the commands. For remote control
all LinPac commands are available but there can be (and should be) some
restrictions for each user.
<p>The remote command must start with the <tt>//</tt> sequence. For example
if some connected users sends you a text '<tt>//info</tt>' your terminal
will send back the station information.
<p>The remote commands can be disabled using the command <tt>:remote off</tt>
and enabled by <tt>:remote on</tt>. You can also specify only some commands
to be available for remote users. The default list of available remote
commands is defined in the <b>init.mac</b> file (the DEF_RCMD line). There
is also the posibility to enable various commands for each user. This is
described in <a href="#POS5">chapter 5</a>.
<p><a NAME="POS3_6"></a>
<h3>
3.6 Character encoding</h3>
In some countries there are used more different national character encodings
for some historical reasons. An user who has his Linux console configured
for example for some of standard ISO encodings may be incompatible with
another one using a traditional encoding. To solve this LinPac allows to
translate the input and output of each channel using a translation table.
The translation tables are stored in files <tt>*.ctt</tt> in the LinPac
home directory.
<p>All known encodings have to be defined in the file called <tt>encodings</tt>
in the LinPac home directory. This file contains a single line for each
encoding that specifies its <i>alias</i> (name which will identify the
encoding in LinPac), <i>encoding name</i> (an official name such as iso-8859-1)
and optionaly the name of the <i>translation table file</i> to be used
(without the extension <tt>.ctt</tt>).
<p>Current encoding can be switched using the <b>:TRanslate</b> command
separately for each channel. To specify the default encoding for each user
you can add the line
<p><tt>ENC=&lt;alias></tt>
<p>to the appropriate record in station database (station database is described
in <a href="#POS5">chapter 5</a>). When no encoding is specified for the
user, the default one is used. The default encoding alias is stored in
the DEF_ENC@0 variable which is set in the macro init.mac.
<p>When the conversion table is not specified in the encodings file LinPac
only changes the name of currently used encoding but doesn't provide any
conversion.
However some applications (such as QLinPac which works in unicode) are
able to do their own conversions.
<p><a NAME="POS3_7"></a>
<h3>
3.7 Huffman compression</h3>
Some packet radio terminals and BBS software allows the compression of
transferred text. When switched on, the sender does the compression of
all data before sending them to the other station and the recipient has
to decompress the data after receiving them. This makes the communication
more reliable and reduces the load of the radio link.
<p>The line compression in LinPac is activated using the <tt>:comp</tt>
command. The compression is switched on using <tt>:comp on</tt> and switched
off using <tt>:comp off</tt>. To ensure that the compression is activated
or deactivated on both ends of the link simultaneously LinPac sends the
remote command <tt>:comp 1</tt> or <tt>:comp 0</tt> to the other station
automaticaly. The arguments 1 and 0 have the same effect as the <tt>on</tt>
and <tt>off,</tt> but they don't cause sending any command to the other
station.
<p>In case that the remote system doesn't support the <tt>:comp</tt> command
it's necessary to switch on the compression on the remote system manually
and then use the<tt>:comp 1</tt> command in LinPac.
<p><a NAME="POS4"></a>
<h2>
4 Variables</h2>
Each channel has its own set of variables. Some of the variables are used
to store the configuration data. User can create and remove the variables
and change the values of existing variables using following commands:
<p><tt>:set &lt;<i>variable</i>> &lt;<i>value</i>></tt> - sets the value
of the variable. If the variable doesn't exist, new one is created.
<br><tt>:get &lt;<i>variable</i>></tt> - prints the value of the variable
<br><tt>:unset &lt;<i>variable</i>></tt> - removes the variable
<p>Some examples:
<br><tt>:set NAME John</tt>
<br><tt>:set WHOLE_NAME 'John Big'</tt>
<br><tt>:get NAME</tt>
<br><tt>:unset NAME</tt>
<p>The name of the variable can contain the specification of the channel.
For example the variable <tt>NAME@5</tt> is the variable '<tt>NAME</tt>'
defined on channel 5.
<p>When LinPac founds the character '<tt>%</tt>' followed by the name of
variable, automaticaly replaces this text with the value of the variable.
Considering previous example the text <tt>%NAME</tt> will be replaced with
John.
<p><a NAME="POS4_1"></a>
<h3>
4.1 Special variables</h3>
There are some special internal variables that don't allow changing their
value. Their value is set and changed directly by LinPac and this variables
can be used to add some actual information to the text. The list follows:
<p><tt>%V</tt> - LinPac version (e.g. 0.02)
<br><tt>%C</tt> - The callsign of connected station
<br><tt>%N</tt> - The name of connected station (when known), else is replaced
by the contents of %U macro
<br><tt>%Y</tt>- Channel callsign (mycall)
<br><tt>%K</tt>- Current channel number
<br><tt>%T</tt> - Current time
<br><tt>%D</tt> - Current date
<br><tt>%B</tt> - Audible bell
<br><tt>%Z</tt> - Current time zone
<br><tt>%U</tt> - The text used when the name is unknown. This can contain
other macros (typicaly %C).
<br><tt>%P</tt>- The port number
<br><tt>%M</tt>- The number of connected users
<br><tt>%A</tt>- The time since the last operator activity
<br><tt>%_</tt>- End of line (CR)
<br><tt>%&lt;</tt>- Contents of the last line received, this is cleared
by reading
<br><tt>%#<i>number</i></tt> - Replaced by a character with an ASCII value
&lt;number> (e.g. %#27 means ESC)
<br><tt>%(<i>command</i>)</tt> - Replaced by the command result.
<br><tt>%[<i>expression</i>]</tt> - Replaced by the result of mathematical
expression
<p>Variables for use in macros only:
<p><tt>%R</tt> - the number of macro arguments (up to 9)
<br><tt>%0</tt> - the name of the macro
<br><tt>%1</tt> - <tt>%9</tt> - macro arguments
<p>For example try to write following text in the editor and press enter:
<p><tt>The time is %T and the date is %D.</tt>
<p><a NAME="POS5"></a>
<h2>
5 Station database</h2>
The station database holds various information about known stations. All
the information is stored in the '<tt>station.data</tt>' file and can be
changed using the normal text editor or using the LinPac :<tt>Name </tt>command.
<p><a NAME="POS5_1"></a>
<h3>
5.1 The station.data file format</h3>
The information about each station is written in the paragraph starting
with the station callsign in the square brackets. Each line in the paragraph
contains one defininion like
<p><tt>&lt;item_name>=&lt;value></tt>
<p>The typical station information can look like this:
<p><tt>[OK0NMA]</tt>
<br><tt>NAME=PC/FlexNet Brno</tt>
<br><tt>TYPE=FLEXNET</tt>
<br><tt>LOC=JN89HE</tt>
<br><tt>QRG=144.8125 MHz</tt>
<br><tt>SYSNUM=85946</tt>
<p>There are no mandatory items, the user can add various items depending
on what information he wants to store. Current LinPac distribution uses
following item names for standard information:
<p><b>NAME</b> - Text information about the station, or the operator's
name. LinPac shows this information when connected to that station. LOC
- QRA locator of the station. Shown after connect too.
<p><b>TYPE</b> - The type of the station. For standard stations the types
FLEXNET, THENET, FBB, BAYBOX, DIEBOX, TNOS, JNOS, DXC and TERM for user
terminals are recomended, but you can add any other type.
<p><b>LANG</b> - The language to communicate with the station. This is
currently supported by the macros only. When this item is set, LinPac will
try to find the macro in the directory <tt>macro/&lt;LANG>/</tt>.
<p><b>NICKNAME</b> - The nickname of operator.
<p>The standard LinPac configuration also uses this item names:
<p><b>TERM</b> - What type of terminal is used. If 'ansi' is set, LinPac
switches to the ansi-color mode after connecting this station.
<br><b>ENC</b> - The character encoding. Used to automaticaly switch to
the i/o character conversion.
<br><b>RCMD</b> - The list of enabled remote commands for this station.
<br><b>QRG</b> - The user frequency. Used by the logbook.
<br><b>SYSNUM</b> and <b>PWD</b> - Sysop password for the station. See
chapter
<a href="#POS8_2">8.2</a> for more information.
<p><a NAME="POS5_2"></a>
<h3>
5.2 The 'Name' command</h3>
The <tt>:Name</tt> command is used to modify the station database. Running
the command without arguments results printing the name of currently connected
station. The arguments are used to modify the data:
<p><tt>&lt;name></tt> - modify the NAME item
<br><tt>-l &lt;locator></tt> - modify the LOC item
<br><tt>-t &lt;type></tt> - TYPE
<br><tt>-L &lt;language></tt> - LANG
<br><tt>-n &lt;nickname></tt> - NICKNAME
<br><tt>-s &lt;item>=&lt;value></tt> - modify other item
<p>The command '<tt>Name -i</tt>' prints all information about the station.
When you need to change the information about other than connected station
add the argument <tt>-c &lt;callsign></tt>.
<p>Examples:
<br><tt>:Name John</tt>
<br><tt>:Name -c OK2JBG -l JN89HF Radek</tt>
<br><tt>:Name -i</tt>
<p><a NAME="POS5_3"></a>
<h3>
5.3 Using the database</h3>
After any connection establishes, LinPac reads the information about the
connected station from the database and creates the set of variables with
names <tt>STN_&lt;<i>database_item_name</i>></tt> containing the values
of the items. This variables can be used in macros as described below.
<p><a NAME="POS6"></a>
<h2>
6 About macros</h2>
<a NAME="POS6_1"></a>
<h3>
6.1 Creating macros</h3>
The macro is a LinPac command that is created using the macro language
and uses other LinPac commands to perform some action. The macro can be
defined by creating the file <tt>macro/&lt;<i>command_name</i>>.mac</tt>.
It's possible to define the abbreviated form of the command, this is described
in <a href="#POS7">chapter 7</a>. There are two ways to define a macro:
<p><b><i>a) Text macros</i></b>
<br>This way is suitable for commands which are intended to produce a larger
text output (for example station information). When executing this macro,
each line that doesn't start with ':' is printed (sent out). All commands
must start with the colon. This is suitable for modifying the text output
using the IF ~ ELSE ~ ENDIF commands or for including some other commands.
<p><b><i>b) Command macros</i></b>
<br>A command macro must start with the line
<br><tt>:MACRO &lt;name></tt>
<br>Each line of a command macro is interpreted as a command (doesn't start
with the colon and doesn't need to start at the begining of line). The
text output is provided by the 'echo' command. This way is more synoptical
and allows including the comments that must start with the sequence '<tt>;;</tt>'
and end with the end of line.
<p>The macro is called with its name. When the first arguments starts with
the '@' symbol the macro is executed from the specified label. For example
the command <tt>:convers @SEND</tt> will execute the macro '<b>convers.mac</b>'
from the label 'SEND' (see next chapter to see how to define the label).
<p><a NAME="POS6_2"></a>
<h3>
6.2 Commands used in macros</h3>
The macro can contain all the LinPac and user defined commands. There are
also some special commands that can be used in macros only:
<p><b>MACRO [name]</b>
<br>Start of the command script definition (see previous section).
<p><b>LABEL &lt;label_name></b>
<br>Creates a label with specified name. In the command scripts the notation
:&lt;label_name> can be used.
<p><b>GOTO &lt;label_name></b>
<br>Jump to specified label.
<p><b>IF ~ ELSE ~ ENDIF</b>
<br>Conditional commands. There are two ways to specify a condition:
<ul>
<li>
normal notation (for more than one command)</li>

<br>&nbsp;
<p>&nbsp;
<p><b>IF</b> &lt;condition>
<br>.
<br>.
<br>(commands to be done when the codition is true)
<br>.
<br>.
<br><b>ELSE</b>
<br>.
<br>.
<br>(commands to be done when the condition is false)
<br>.
<br>.
<br><b>ENDIF</b>
<p>The ELSE part is not necessary - the IF ~ ENDIF notation is possible.
<br>&nbsp;
<li>
abreviated notation (for one conditional command)</li>

<br>&nbsp;
<p>&nbsp;
<p><b>IF</b> (&lt;condition>) command
<p>The parentheses are necessary in this case.</ul>
Following example shows how to use conditions and how to use the data from
station database. We want to create the macro, that will greet the operator
of connected station with his nickname or with his name, if the nickname
is not defined.
<p><b><i>a) The solution using the text macro</i></b> (the comments are
actually not allowed in the text macro, they are here for explanation only)
<p><tt>:if %(exist STN_NICKNAME) == 1 ;; when NICKNAME is defined</tt>
<br><tt>Hello %STN_NICKNAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
;; greet with the nickname</tt>
<br><tt>:else&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
;; else (not defined)</tt>
<br><tt>Hello %N !&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
;; greet with the name</tt>
<br><tt>:endif&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
;;(following commands are always executed)</tt>
<br><tt>You have connected to %Y at %T. ;; Say your callsign and current
time</tt>
<p><b><i>b) The solution using the command macro</i></b>
<p><tt>:macro GREETING ;; start the command macro</tt>
<br><tt>if %(exist STN_NICKNAME) == 1 ;; when NICKNAME is defined</tt>
<br><tt>echo Hello %STN_NICKNAME&nbsp;&nbsp;&nbsp;&nbsp; ;; greet with
the nickname</tt>
<br><tt>else&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
;; else (not defined)</tt>
<br><tt>echo Hello %N !&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
;; greet with the name</tt>
<br><tt>endif&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
;; (following commands are always executed)</tt>
<br><tt>echo You have connected to %Y at %T. ;; Say your callsign and current
time</tt>
<p><a NAME="POS6_3"></a>
<h3>
6.3 Special system macros</h3>
There are some special macros that are executed automaticaly by LinPac
in some cases:
<p><b>init.mac</b> - This is executed when LinPac is started and its function
is to set the callsigns, screen options, and some other parametres.
<p><b>cinit.mac</b> - This is executed always when some connection establishes.
The distribution version of this macro sets the channel parametres in order
to station settings in station database (allowed remote commands, i/o encoding,
terminal type) and executes the logbook command to sign a start of connection.
LinPac always passes two arguments to this macro. The first (%1) argument
is the callsign of connected station and the second (%2) argument is the
callsign of the previously connected station that provides the connection
or it's empty in case of direct connection.
<p><b>ctext.mac</b> - This macro is executed when some station connects
to the terminal. It should print some greeting text. No arguments are passed.
<p><b>cexit.mac</b> - This is executed always when some connection closes.
The distribution version of this macro just executes the logbook command
to sign the end of the connection and clears the list of allowed remote
commands. There is always one argument passed by LinPac (%1) and contains
the callsign of the disconnected station.
<p><a NAME="POS7"></a>
<h2>
7 Creating new commands</h2>
New command can be represented by the macro or by the external program
(standard linux program or special LinPac application). Macros are placed
in the <tt>$LINPACDIR/macro</tt> directory and external programs are placed
int the <tt>$LINPACDIR/bin</tt> directory. In both of this directories
is the file '<tt>commands</tt>' that contains the list of commands in that
directory. You should specify here the name of the file, the name of the
command in LinPac (use capital letters to specify the mandatory part of
the command). It's not necessary to include the macros here, if you don't
want to define the abbreviation.
<br>In case of external programs there is also the possibility to specify
the program flags. Currently this flags are supported:
<p>A - Ascii mode program. LinPac provide the CR &lt;-> LF conversion when
communicating with this program. This is the default setting.
<br>B - Binary mode. Disables the conversions.
<br>C - Leaves the stdout stream of the program on the console and reads
its stderr stream instead.
<br>D - DOS conversion - ignore LF characters.
<br>S - Reads both stdin and stderr streams of the program (shell mode).
<br>L - Local. This program is never available as the remote command.
<br>R - This program is always run as the remote command (its messages
are always sent out).
<br>P - LinPac removes the paths from filenames that are passed as the
argument of this command when the FIXPATH command is on. This is the security
option.
<p><a NAME="POS8"></a>
<h2>
8 Standard applications</h2>
<a NAME="POS8_1"></a>
<h3>
8.1 File transfer protocols</h3>
At present LinPac supports two protocols for transfering files:
<ul>
<li>
<b>Autobin</b> - a simple protocol suitable for short files</li>

<li>
<b>YAPP</b> - very sophisticated transfer protocol that provides better
error detection and is able to resume previously interrupted transfer</li>
</ul>
Usage of this protocols is described in chapter <a href="#POS3_4">3.4</a>.
<p>LinPac can also automaticaly save incomming 7+ files. After saving all
parts of file LinPac tries to call the '7plus' program to decode the file.
Received 7+ files are not removed automaticaly.
<p><a NAME="POS8_2"></a>
<h3>
8.2 Automatic password generation</h3>

<h4>
<a NAME="POS8_2_1"></a>8.2.1 Login passwords</h4>
LinPac provides automatic replies to the login authorization requests for
following systems: F6FBB BBS (VE2BLY C_FILTER), BAYBOX, TNOS (numeric MD5).
Each station which requests the login password must have an entry in the
station database containing at least following fields:
<p><tt>TYPE=&lt;<i>station_type</i>></tt> (FBB, BAYBOX or TNOS)
<br><tt>LOGINPW=&lt;<i>login_password</i>></tt>
<br><tt>PWPROMPT=&lt;<i>BBS_prompt</i>></tt>
<p><i><tt>BBS_prompt</tt></i> is the text which the BBS sends when requesting
the authorization. Usually it looks like 'Password>' or 'OK0XYZ>'.
<h4>
<a NAME="POS8_2_2"></a>8.2.2 Sysop and general use passwords</h4>
LinPac provides autimatic authorization to following systems: F6FBB BBS
(MD2 password), FLEXNET (older versions, the 'magic' numbers system and
newer TheNet-like system), THENET and BAYBOX. Each station you want authorize
to must have anentry in the station database. For password generation following
fields must be set:
<p><tt>TYPE=&lt;<i>station_type</i>></tt>
<br><tt>PWD=&lt;<i>your_password</i>> or</tt>
<br><tt>SYSNUM=&lt;<i>magic_number</i>></tt>
<p>Known station types are:
<ul>
<li>
<b>FBB</b> - An F6FBB BBS. The PWD field must contain your password.</li>

<li>
<b>THENET</b> - A TheNet node. Again the PWD must contain the password.</li>

<li>
<b>BAYBOX</b> - The same system as TheNet.</li>

<li>
<b>FLEXNET</b> - FlexNet node. If the magic number algorithm is used (older
versions of flexdigi) the SYSNUM field must contain your magic number and
the PWD field mustn't be set. When the TheNet algorithm is used (newer
versions of flexdigi), the PWD field must contain the password and the
SYSNUM field mustn't be used.</li>
</ul>
In case of <b>FBB</b> the authorization algorithm can be choosed by setting
the <b>MD</b> field in the station database:
<br><tt>MD=5</tt> - this value will select the MD5 algorithm
<br><tt>MD=2</tt> - this value will select the MD2 algorithm
<p>When no value is set, MD2 algorithm is used.
<p>After connecting to the station you want authorize to the authorization
sequence begins with the <tt>:PW</tt> command. LinPac will send the authorization
command to the station and tries to answer the authorization request using
your password. If the password is correct, authorization should finish
succesfuly.
<p>The PW command accepts following parametres:
<p><tt>:PW [&lt;<i>command</i>> [&lt;<i>system</i>> [&lt;<i>password</i>>]]]</tt>
<p>where
<br><tt>&lt;<i>command</i>></tt> is the command to be send to the remote
station to start authorization sequence (<i>sys</i> by default)
<br><tt>&lt;<i>system</i>></tt> is one of the above-mentioned supported
systems, this system is used instead of the one specified in station database
<br><tt>&lt;<i>password</i>></tt> is the password that will be used instead
of the one specified in the station database
<p>It's recommended to create simple macros for frequently used authorizations
thad require special arguments to PW command.
<p><a NAME="POS8_3"></a>
<h3>
8.3 Utilities for mail exchange</h3>
LinPac contains some utilities for exchanging mail with the F6FBB BBS.
For the proper function of this utilities following variables must be created
in channel 0:
<p><b>HOME_BBS</b> - The AX.25 path to the home BBS including the port
name. For example <tt>kiss:OK0PAB OK0NMA</tt> is the BBS <tt>OK0PAB</tt>
which can be connected on port <tt>kiss</tt> via the node <tt>OK0NMA</tt>.
<br><b>HOME_ADDR</b> - The full hierarchical address of the BBS. For example
<tt>OK0PAB.#MOR.CZE.EU</tt>.
<p>For setting the variable the <tt>:SET</tt> command can be used. For
example:
<p><tt>:set HOME_BBS@0 "kiss:OK0PAB OK0NMA"</tt>
<p>The reccomended place to set this variables is the startup macro <tt>init.mac</tt>.
The default version of this macro contains an example of setting this variables.
After setting this variables following commands are available:
<p><tt>:GETMSG &lt;<i>message_number</i>> [&lt;<i>message_number</i>> ...]</tt>
<br>Reads specified messages from the BBS and stores them into <tt>/var/ax25/mail/&lt;<i>BBS_callsign</i>>/&lt;<i>message_number</i>></tt>.
The directory for the BBS must be created before using this command (use
capital letters for the BBS callsgin). When the message number starts with
the letter <b>'p'</b>, the message is considered as a personal one and
it's killed automaticaly after download. You can specify the kill command
by setting the <tt>KILLPERS</tt> variable in channel 0 using the <b>#</b>
character for the number of message (e.g. <tt>:set KILLPERS@0 "kill #"</tt>).
When this variable is not set, the default command <tt>K #</tt> is used.
<p><tt>:SP &lt;<i>address</i>></tt> or <tt>:SB &lt;<i>address</i>></tt>
<br>This commands can be used for creating new private message or the bulletin.
The usage is the same as at the FBB BBS.
<p><tt>:FORWARD</tt>
<br>Transfers all new messages to the BBS.
<p><tt>:DELMSG &lt;<i>message_number</i>></tt>
<br>Marks the message for delete.
<p><tt>:PACK</tt>
<br>Deletes all marked messages.
<p><a NAME="POS8_4"></a>
<h3>
8.4 Mail client</h3>
This application allows full screen message editing and browsing. It provides
the frontend to mail exchange utilities. Mail client is started by the
<tt>:MAIL</tt>
command. After the program is started the <b>H</b> key shows the operating
instructions.
<p><a NAME="POS8_5"></a>
<h3>
8.5 Logbook</h3>
Logbook is a simple application that is started from the cinit.mac and
cexit.mac scripts (at the begining and at the end of each connection).
It creates the file in the 'log' directory for each callsign and writes
here the time when the connections were started and finished and the QRG.
The QRG is taken from the <tt>QRG</tt> field of the station entry in station
database. If the station has no QRG defined, the value from the <tt>QRG@0</tt>
variable is taken.
<p><a NAME="POS9"></a>
<h2>
9 Command line options</h2>
LinPac accepts following command line options:
<ul><b>-m</b> : disable monitor. When this option is used, LinPac doesn't
create it's internal monitor objects and saves memory.
<p><b>-s</b> : disable <i>ax25spyd</i>. Linpac normaly tries to connect
<i>ax25spyd</i>
to get monitor data and when the connection fails, the
<i>listen</i> utility
is used instead. When <b>-s</b> swicth is used, LinPac doesn't try to connect
<i>ax25spyd</i>
at all.
<p><b>-d</b> : daemon mode. LinPac doesn't initialize the screen and runs
in the background.
<p><b>-p &lt;string></b> : specify the arguments for the <i>listen</i>
program. Default value is <tt>ar8</tt>.</ul>
<a NAME="POS10"></a>
<h2>
10 Copying</h2>
LinPac is Copyright (c) 1998-2001 by Radek Burget, OK2JBG
<p>This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by the
Free Software Foundation;
<p>This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details (contained in file 'license').
<p>You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
675 Mass Ave, Cambridge, MA 02139, USA.
<p>
<hr>
<h2>
<a NAME="POSAppendixA"></a></h2>

<h2>
Appendix A - LinPac commands</h2>

<h3>
Built-in commands</h3>
<b><i>a) action commands</i></b>
<p><b>ABort [address]</b>
<br>Cancels an action. Some commands are cancelled without specifying any
address (e.g. autobin). Addresses for some commands:
<br>&nbsp;
<table BORDER CELLSPACING=0 CELLPADDING=5 >
<tr>
<td>
<center><b>Action</b></center>
</td>

<td HEIGHT="10">
<center><b>Address for abor</b>t</center>
</td>
</tr>

<tr>
<td>autobin RX/TX</td>

<td><b>autobin</b> (or none)</td>
</tr>

<tr>
<td>yapp RX/TX</td>

<td><b>yapp</b> (or none)</td>
</tr>

<tr>
<td>7plus autosave</td>

<td><b>7plus</b> (or none)</td>
</tr>

<tr>
<td>read / RBin</td>

<td><b>read</b> (or none)</td>
</tr>

<tr>
<td>write / WBin</td>

<td><b>write</b> (or none)</td>
</tr>

<tr>
<td>forward</td>

<td><b>forward</b> (mandatory)</td>
</tr>
</table>

<p>The most of other commands doesn't need any address.
<p><b>COMPress [on | off | 1 | 0]</b>
<br>Switches the link compression on or off. The arguments 1 and 0 have
the some meaning as on or off but the remote station is not synchronized.
<p><b>Connect [port:]call [digi [digi...]]</b>
<br>Initiates a connection to specified station.
<p><b>Disconnect</b>
<br>Disconnect actual channel.
<p><b>Echo &lt;text></b>
<br>Prints (sends) specified text.
<p><b>FLUSH</b>
<br>Flush an output buffer. (for example in scripts before disconnect or
before requestig input)
<p><b>SYstem</b>
<br>End of LinPac, cancels all connections.
<p><b>UNproto &lt;text></b>
<br>Send specified text in an UI frame.
<p><b>VERsion</b>
<br>Version information.
<p><b><i>b) Commands for variables handling</i></b>
<p><b>SET &lt;variable> &lt;value></b>
<br>Assign a value to the variable. If the variable doesn't exist, it is
created.
<p><b>UNSET &lt;variable></b>
<br>Removes the variable.
<p><b>GET &lt;variable></b>
<br>Returns the value of the variable. Usually is better to use macro %variable
(see file macros.txt)
<p><b>EXISTs &lt;variable></b>
<br>Rerurns 1 when variable exists, 0 when it doesn't exist.
<p><b><i>c) information commands</i></b>
<p><b>ENVINFO</b>
<br>Displays the actual information about the variable environment.
<p><b>ISCONnected</b>
<br>Returns "1" when the channel is connected, "0" otherwise.
<p><b>MAXCHannels</b>
<br>Returns number of LinPac channels (typically 8).
<p><b>PCALL</b>
<br>Returns the physical callsign of the connected station (first station
connected)
<p><b>UTCTime</b>
<br>Returns actual UTC time (operating system value).
<p><b><i>d) setup commands</i></b>
<p><b>CBell [on|off]</b>
<br>When on then LinPac gives an audio signal when any station connects
or disconnects.
<p><b>FIXPath [on|off]</b>
<br>When FIXPath=ON then then the paths to files mentioned in parametres
are ignored for external commands marked with a P flag. That means only
the default paths are usable.
<p><b>INFOLEvel [0 | 1 | 2]</b>
<br>Sets the mode of information line:
<br>0 - off (no connection info)
<br>1 - show importatnt informations
<br>2 - show all available informations
<p><b>KNax [on|off]</b>
<br>Enable/disable sound signal when data is received.
<p><b>Language [language]</b>
<br>Sets actual languge. At the time supported in scripts only.
<p><b>LIsten [on|off]</b>
<br>When listen is off, all connect requests are ignored by LinPac. Default
value is on.
<p><b>MBIN [on|off]</b>
<br>When switched on, the monitor shows binary data. When switched off,
the binary data is hidden and replaced with the &lt;Binary data> information.
<p><b>MONitor [on|off]</b>
<br>Enable/disable monitor function. This command is usually followed by
STATLINE and CHNLINE commands to adjust the screen layout.
<p><b>MYcall &lt;call></b>
<br>Changes the channel callsign.
<p><b>Port &lt;port_name></b>
<br>Sets the default port for Connect command.
<p><b>PRIVate [on|off]</b>
<br>Marks the channel as private. No stations are allowed to connect on
this channel.
<p><b>RCMD [&lt;command list>]</b>
<br>Specifies the list of the available external commands. Only the commands
from this list are available to remote user. It's possible to include abbreviated
commands. The remote commands can be executed on the channel which provides
the connection only. Adding the @ character just after the command name
in the list (e.g. GET@) means that the remote user is allowed to specify
the channel, where the command should be executed (e.g. //GET@5 NAME).
<p><b>REMote [on|off]</b>
<br>Enables or disables remote commands.
<p><b>RXFlow [on|off]</b>
<br>Enables or disables data RX. The data is received only when <b>RXFlow</b>
is enabled on <b><u>all</u></b> channels.
<p><b>TIMEZone [zone]</b>
<br>Set the time zone. Used for information only, doesn't affect time.
<p><b>UNSrc [call]</b>
<br>The source callsign for UI frames.
<p><b>UNDest [call]</b>
<br>The destination address for UI frames.
<p><b>WAtch &lt;port | 0> &lt;pattern> &lt;command/text></b>
<br>Starts to watch specified port (0 for all ports). When specified pattern
is received then specified command is executed or text is sent. (commands
must start with a colon)
<p><b><i>e) Screen control commands</i></b>
<p><b>STATLINE &lt;n></b>
<br>Places the status line to the n-th line of the screen.
<p><b>CHNLINE &lt;n></b>
<br>Places the channel line to the n-th line of the screen.
<p><b>SWAPEDit</b>
<br>Replaces the editor window with the QSO window and vice versa.
<p><b>INFOLine &lt;nm> &lt;text></b>
<br>Changes the specified info line text. If info line doesn't exist, it's
created.
<p><b>REMOVEINFO &lt;nm></b>
<br>Removes specified info line.
<p><b>TRanslate &lt;alias></b>
<br>Switches I/O character translation (see <a href="#POS3_6">chapter 3.6</a>).
Running this command on channel 0 (unproto channel) switches the translation
table in all channels including unproto channel and monitor window.
<p><b>TErm &lt;type></b>
<br>Set the terminal type. If 'ansi' is entered then ANSI-color control
sequences are interpreted.
<p><b>SCRLimit &lt;low-limit> &lt;high-limit></b>
<br>When the size of the window buffer exceeds the high limit, then the
size of buffer is truncated to low-limit. The values are in bytes, default
is 356352 and 524288 (384 and 512 kB).
<p><b>DEFColor &lt;color_name> &lt;foreground_color> &lt;background_color></b>
<br>Changes the color of some part of screen. The color_name parameter
specifies which part of screen to change. Following values can be used:
<br>QSO_RX - received text in QSO window
<br>QSO_TX - sent text in QSO window
<br>QSO_INFO - local information in QSO window
<br>QSO_CTRL - control characters in QSO window
<br>ED_TEXT - normal text in editor
<br>ED_INFO - command results in editor
<br>ED_CTRL - control characters in editor
<br>CI_NORM - channel info line - channel numbers
<br>CI_SLCT - selected channel
<br>CI_NCHN - normal channel
<br>CI_PRVT - private channel
<br>IL_TEXT - status lines
<p>For specifying foreground and background colors these values can be
used:
<br>BLACK, RED, GREEN, BROWN, BLUE, MAGENTA, CYAN, LIGHTGRAY
<br>These additional colors can be used for foreground only:
<br>DARKGRAY, LIGHTRED, LIGHTGREEN, YELLOW, LIGHTBLUE, LIGHTMAGENTA, LIGHTCYAN,
WHITE
<p><b><i>f) system commands</i></b>
<p><b>RESULT &lt;text></b>
<br>Returns the text as the result of the script.
<p><b><i>g) string commands</i></b>
<p><b>STRMid &lt;start> &lt;length> &lt;string></b>
<br>Returns the substring starting at &lt;start> position and &lt;length>
characters long.
<p><b>STRLeft &lt;length> &lt;string></b>
<br>Returns the left substring of specified length.
<p><b>STRRight &lt;length> &lt;string></b>
<br>Returns the right substring of specified length.
<p><b>STRLen &lt;string></b>
<br>Returns the length of the string.
<p><b>STRPos &lt;substring> &lt;string></b>
<br>Returns the position of the substring in the string or -1 when the
string doesn't contain the substring.
<p><b>UPCASE &lt;string></b>
<br>Returns the string converted into capital letters.
<h3>
External commands</h3>
<b>Bell</b>
<br>Calls the operator using an acoustic signal.
<p><b>Compose [p|b] &lt;address> [&lt;subject>] [&lt;filename>]</b>
<br>Create a private message or a bulletin for the specified address. When
no subject is specified, the user is prompted for the subject. When filename
is specified, the message is created from the file, otherwise the text
is read from the LinPac console.
<p><b>CATCH -iol &lt;pattern> &lt;command/text></b>
<br>Catch is the extended version of <b>WAtch</b> command. It scans one
or more data streams (-i = input stream, -o = output stream, -l = local
info stream) for the pattern. The pattern can contain <b>*</b> and <b>?</b>
wildcards. The command can contain string <tt>$1</tt> .. <tt>$n</tt> which
are replaced with the string corresponding to the n-th wildcard in the
pattern. The <tt>$0</tt> string is replaced with the whole string that
matches the pattern. See <tt>catch -h</tt> for extended parametres.
<p><b>DELMSG &lt;message_number></b>
<br>Mark the message for delete.
<p><b>FORWARD</b>
<br>Transmits all new messages to a BBS.
<p><b>GETMsg &lt;numers></b>
<br>Reads the messages from BBS.
<p><b>MAIL</b>
<br>Simple full-screen mail client.
<p><b>MHeard</b>
<br>List of heard stations.
<p><b>Name</b>
<br>Stores station name or changes a station database. (see Name -h)
<p><b>PACK</b>
<br>Deletes all messages marked for delete.
<p><b>Read &lt;filename></b>
<br>Sends specified text file.
<p><b>RPRg &lt;filename></b>
<br>Transmits the file using Autobin protocol.
<p><b>RTt</b>
<br>Measures the round trip time.
<p><b>SENDFile [p|b] &lt;file> &lt;address> [&lt;num_messages>]</b>
<br>This command takes a binary file, splits the file to <i>num_messages</i>
parts using <b>7plus</b> and creates a separate message for each part.
When <i>num_messages</i> is not specified, the command tries to use
<br>the variable <tt>BLOCK7P@0</tt> which should contain the maximal size
of one block. If this variable is not set, blocks of 5 kB are created.
<p><b>WBin / RBin</b>
<br>The same as Read / Write, but for binary files.
<p><b>Write &lt;filename></b>
<br>Starts to write received text to the file.
<p><b>YPUT &lt;filename></b>
<br>Transmits the file using the YAPP protocol.
<h3>
Macros</h3>
<b>Activity</b>
<br>Shows the time since the last operator activity.
<p><b>Conv</b>
<br>Enter the conference.
<p><b>Info</b>
<br>Local station information.
<p><b>Help</b>
<br>Brief help.
<p><b>PW [&lt;command> [&lt;system> [&lt;password>] ] ]</b>
<br>Starts the authorization to the BBS or the node. See <a href="#POS8_2_2">chapter
8.2.2</a> .
<p><b>Quit</b>
<br>Sends the quit text and disconnects.
<p><b>Users / CStatus</b>
<br>List of connected users.
<h3>
Commands for creating scripts</h3>
<b>MACRO [name]</b>
<br>Start of the command script definition (see below).
<p><b>LABEL &lt;label_name></b>
<br>Creates a label with specified name. In the command scripts the notation
:&lt;label_name> can be used.
<p><b>GOTO &lt;label_name></b>
<br>Jump to specified label.
<p><b>IF ~ ELSE ~ ENDIF</b>
<br>Conditional commands. There are two ways to specify a condition:
<ul>
<li>
normal notation (for more than one command)</li>

<p><br><b>IF</b> &lt;condition>
<br>.
<br>.
<br>(commands to be done when the codition is true)
<br>.
<br>.
<br><b>ELSE</b>
<br>.
<br>.
<br>(commands to be done when the condition is false)
<br>.
<br>.
<br><b>ENDIF</b>
<p>The ELSE part is not necessary - the IF ~ ENDIF notation is possible.
<p>abreviated notation (for one conditional command)
<p><b>IF</b> (&lt;condition>) command
<p>The parentheses are necessary in this case.</ul>
<b>RETURN [&lt;data>]</b>
<br>Abort the macro execution and return the data as a result.
<p><b>SLEEP &lt;seconds></b>
<br>Pause the macro for specified time in seconds.
<p><b>WAITFOR &lt;condition></b>
<br>Pause the macro until the condition is true.
<p>
<hr WIDTH="100%">
<center><i><font size=-1>Last update: 1.3.2001</font></i></center>

</body>
</html>