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
|