File: cinit.mac

package info (click to toggle)
linpac 0.24-3
  • links: PTS
  • area: main
  • in suites: buster
  • size: 3,764 kB
  • ctags: 2,761
  • sloc: cpp: 17,368; sh: 10,621; ansic: 4,033; makefile: 186; perl: 101
file content (79 lines) | stat: -rw-r--r-- 2,216 bytes parent folder | download | duplicates (7)
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
:macro cinit
;;
;; cinit.mac - this macro is called automatically when any connection ensures
;;
;; Parametres: %1 - callsign of connected station
;;             %2 - callsign of previously connected station
;;                  or empty when first connection
;;             %3 - contains either "connect" (connected forward)
;;                  or "reconnect" (reconnected back)
;;

rxflow off

;; Setup remote command acces list
if %(exist STN_RCMD) == 1
  rcmd %STN_RCMD
else
  rcmd %DEF_RCMD@0
endif

;; When a ENC variable is set for this station, change character translation
;; table
if %(exist STN_ENC) == 1
  translate %STN_ENC
else
  translate %DEF_ENC@0
endif

;; When a TERM variable is set, change terminal type
if %(exist STN_TERM) == 1
  term %STN_TERM
else
  term none
endif

;; When it's a primary connection 
if "%2" == ""
  ;;switch off the compression
  compress off
  ;;if a path to logbook is set, add a logbook  entry
  if %(exist LOG_PATH@0) == 1
    if %(exist STN_QRG) == 1
      log start %LOG_PATH@0/%Y %1 "%STN_QRG"
      set LOG_QRG "%STN_QRG"
    else
      if %(exist QRG@0) == 1
        log start %LOG_PATH@0/%Y %1 "%QRG@0"
        set LOG_QRG "%QRG@0"
      endif
    endif
  endif
endif

;; Reply to login password request (if any)
if "%3" == "connect"
  if %(exist STN_LOGINPW) == 1
    if %(exist STN_PWPROMPT) == 1
      ;; *** FBB VE2BLY C_FILTER ***
      if "%STN_TYPE" == "FBB"
        catch -i -m "Waiting for password prompt" "%STN_PWPROMPT*\r" ":tnpwd -n '%STN_LOGINPW' '%STN_PWPROMPT$1'"
      endif
      ;; *** BayBox system ***
      if "%STN_TYPE" == "BAYBOX"
        catch -i -m "Waiting for password prompt" "%STN_PWPROMPT*\r" ":tnpwd '%STN_LOGINPW' '%STN_PWPROMPT$1'"
      endif
      ;; *** (T)NOS MD5 (numeric) by SQ2FRB ***
      if "%STN_TYPE" == "TNOS"
        catch -i -m "Waiting for password prompt" "%STN_PWPROMPT*]" ":md5pwd -num '%STN_LOGINPW' '%STN_PWPROMPT$1]'"
      endif
      if "%STN_TYPE" == "NOS"
        catch -i -m "Waiting for password prompt" "%STN_PWPROMPT*]" ":md5pwd -num '%STN_LOGINPW' '%STN_PWPROMPT$1]'"
      endif
    else
      echo Cannot reply to password: no PWPROMPT set in station database
    endif
  endif
endif

rxflow on