home *** CD-ROM | disk | FTP | other *** search
- /*
- Crosstalk for Windows Answer Mode Script
-
- This script provides an unattended 'answer mode' to answer outside calls.
- The NetID is used by this script to limit callers to a specific directory.
-
- Copyright (C) 1989, 1990 Digital Communications Associates, Inc.
- All Rights Reserved.
-
- Version 1.00 07-17-89 PJL
- Version 1.01 01-04-90 PJL
- Version 1.1 04-04-90 PJL
- */
-
-
- -- USER DEFINABLE OPTIONS VARIABLES
- string Logfile, DirRestrict, Permission
- Logfile = ''
- DirRestrict = 0
- Permission = '112111'
-
- /* Logfile: tells ANSWER what file to use for logging calls.
- Set to null, ANSWER will not log calls.
-
- DirRestrict: set to 1 to restrict callers to one specific directory.
- Put directory name in the NetID session variable.
- If DirRestrict = 1 and NetID is blank, ANSWER will restrict
- the caller to the DIRFIL directory.
-
- Permission: tells ANSWER which commands the caller may issue.
- This string has six bytes, one for each command (except
- for Bye and Help, which are always allowed) as follows:
-
- byte 1 - Send (Crosstalk sends file to caller)
- 1 for yes, 0 for no
-
- byte 2 - Receive (Crosstalk receives file from caller)
- 1 for yes, 0 for no
-
- byte 3 - Protocol (get and/or set current protocol)
- 0 = disables command
- 1 = caller can see current protocol setting, but can't
- change it.
- 2 = caller can change protocol setting remotely.
-
- byte 4 - Type (upload a text file to caller)
- 1 for yes, 0 for no
-
- byte 5 - Dir (send directory listing to caller)
- 1 for yes, 0 for no
-
- byte 6 - Chdir (change current drive/directory)
- 1 for yes, 0 for no
- (Automatically set to 0 if DirRestrict = 1)
- */
-
-
- -- global variables:
- string rs232_str, rs232_char, pword, capname
- string cdate, ctime, fstr, fname, ans
- integer cmd_on, time_out, sav_speed
-
-
- -- constants:
- integer ctrlc, bskey, crkey, esckey, spkey, delchr
- ctrlc = 3
- bskey = 8
- crkey = 13
- esckey = 27
- spkey = 32
- delchr = 127
-
- -- reply strings:
- EOLN = chr(13) + chr(10)
- XTANS = 'Crosstalk for Windows Answer '
- WAIT_MSG = XTANS + 'waiting for calls ...'
- XTALK_MSG = XTANS + ' - Press Control-C for Command prompt'
- CMDS_ARE = 'Available commands are:'
- CMD_SET = 'Send Receive Protocol Type Dir Chdir Bye Help'
- PROTS = 'Available protocols are: CROSSTALK, DART, Xmodem, ' + ...
- 'Xmodem/CRC,' + EOLN + ...
- ' Xmodem/1K, Ymodem/Batch, Zmodem, Kermit'
- PLEASE = 'Please initiate ' : REM_SYS = ' command on your system ...'
- INIT_SEND = PLEASE + 'Send' + REM_SYS
- INIT_RECV = PLEASE + 'Receive' + REM_SYS
- INIT_REQU = PLEASE + 'Request' + REM_SYS
-
-
- -- code:
- -- check Restriction level
- if DirRestrict then {
- Permission = inject(Permission,'0',6)
- if length(NetID) then {
- if upcase(left(NetID,2)) <> curdrive then ...
- drive left(NetID)
- DirFil = NetID : chdir NetID
- }
- }
-
- cls
- trap on
- Echo = off
- message ' Press Esc to end Answer'
-
- -- go directly to command mode if direct-connect
- label CHECK_LOCAL
- if Local then {
- go
- reply EOLN;XTALK_MSG;EOLN;EOLN;
- gosub GET_CMD
- goto CHECK_LOCAL
- }
-
- -- else set up modem
- print at 13,25, 'ANSWER.XWS setting up modem ...'
- Display = off : go
- wait 5 ticks : reply
- wait 5 ticks : reply ModemInit
- wait 5 ticks : reply AnswerSetup
- wait 5 ticks : Display = on
- print at 13,15, WAIT_MSG
- Display = off
- if length(Logfile) then gosub OPEN_LOG
-
- sav_speed = Speed
- label WAIT_FOR_CALLS
- Speed = sav_speed
- while not Online
- if inkey = esckey then goto RESET_MODEM
- e = error
- wend
- watch 2 seconds for
- 'CONNECT 110' : if ModemChange then Speed 110
- 'CONNECT 300' : if ModemChange then Speed 300
- 'CONNECT 600' : if ModemChange then Speed 600
- 'CONNECT 1200' : if ModemChange then Speed 1200
- 'CONNECT 2400' : if ModemChange then Speed 2400
- 'CONNECT 4800' : if ModemChange then Speed 4800
- 'CONNECT 9600' : if ModemChange then Speed 9600
- 'CONNECT' :
- endwatch
- cmd_on = false
- cls : Display = on
- reply EOLN;XTALK_MSG;EOLN;EOLN;
- gosub ANSWER_CALL
- message ' Press Esc to end Answer'
- cls : go
- print at 13,15, WAIT_MSG
- Display = off
- goto WAIT_FOR_CALLS
-
-
- LABEL ANSWER_CALL
- cdate = date : ctime = time
- if null(Password) then goto GET_CMD
- try = 0
- wait 1 second
- LABEL GET_PWORD
- reply EOLN;'Password: ';
- if try = 0 then reply chr(5);
- print : print 'Password: ';
- pword = ''
- nextline pword, 120, 40
- if pword = Password then {
- reply EOLN;'Password accepted; please proceed.';EOLN;
- print : print 'Password accepted; please proceed.'
- goto GET_CMD
- }
- try = try + 1
- if try = 3 then {
- reply EOLN;'Bad Password: Access Denied.';EOLN;
- print : print 'Bad Password: Access Denied.'
- gosub END_CALL
- }
- goto GET_PWORD
-
- LABEL GET_CMD
- gosub ERROR_CHECK
- rs232_str = ''
- if cmd_on then reply 'Command: '; : print 'Command: ';
- time_out = (60*curminute) + cursecond + 180
-
- LABEL GET_CHAR
- gosub ERROR_CHECK
-
- -- check for outgoing chars
- k = inkey
- if k <> 0 then ...
- if k = crkey then print : reply EOLN;
- else if k = esckey then gosub CHECK_BYE
- else print chr(k); : reply chr(k);
-
- -- check for incoming chars
- rs232_char = nextchar
- if null(rs232_char) then {
- cur_time = 60*curminute + cursecond
- if cur_time >= time_out and not Local then gosub END_CALL
- else goto GET_CHAR
- }
-
- ch = asc(rs232_char) & 127
-
- -- Control-C ?
- if ch = ctrlc then {
- reply EOLN; : print
- cmd_on = true
- goto GET_CMD
- }
-
- -- Carriage Return ?
- if ch = crkey then {
- if Newline then rs232_char = nextchar
- print : reply EOLN;
- gosub WHICH_CMD
- goto GET_CMD
- }
-
- -- Backspace ?
- if ch = bskey or ch = delchr then {
- if not null(rs232_str) then {
- reply chr(bskey);
- x = xpos - 2
- print at ypos,x+1, ' ';
- print at ypos,x, winstring(ypos,x,1);
- rs232_str = left(rs232_str,length(rs232_str)-1)
- }
- goto GET_CHAR
- }
-
- -- printable char ? Toss it if not.
- if ch < spkey or ch >= delchr then goto GET_CHAR
- else {
- print rs232_char;
- reply rs232_char;
- rs232_str = rs232_str + rs232_char
- }
-
- -- check length of string
- if length(rs232_str) >= 68 then {
- print : reply EOLN;
- gosub WHICH_CMD
- goto GET_CMD
- }
-
- goto GET_CHAR
-
-
- -- Check Online and Error flags
- label ERROR_CHECK
- if not Online or not Connected then {
- bye : e = error
- errmsg = 'Lost Connection'
- goto ERR_MSG
- }
- if not error then return
- errmsg = str(errclass) + ', ' + str(errno)
- if errclass = 13 and errno = 12 then errmsg = 'File(s) not found'
- else if errclass = 20 then errmsg = 'Lost Connection'
- else if errclass = 45 then {
- if errno = 1 then errmsg = 'General Timeout'
- else if errno = 2 then errmsg = 'Host not responding'
- else if errno = 3 then errmsg = 'Bad response from host'
- else if errno = 4 then errmsg = 'MaxErrors exceeded'
- else if errno = 5 then errmsg = 'Lost Connection'
- else if errno = 7 or errno = 8 then errmsg = 'Transfer cancelled'
- else if errno = 10 then errmsg = 'File(s) not found'
- else if errno = 11 then errmsg = 'Local disk full'
- else if errno = 12 then errmsg = 'Host disk full'
- else if errno = 15 then errmsg = 'Local system busy'
- else if errno = 18 then errmsg = 'Host BlockSize must be 1,2,3 or 4'
- }
- label ERR_MSG
- errmsg = 'Error: ' + errmsg
- print : print errmsg : print
- if Online then {
- reply EOLN;EOLN;errmsg;EOLN;EOLN;
- return
- }
- else goto END_CALL
-
-
- -- look for valid commands:
- LABEL WHICH_CMD
- -- return of string length is zero
- if length(rs232_str) = 0 then cmd_on = false : return
-
- -- check for Zmodem startup sequence
- if left(rs232_str,2) = 'rz' or left(rs232_str,4) = '**B0' then {
- fname = ''
- Protocol = 'Zmodem'
- goto RECV_FILE
- }
- if not cmd_on then return
- rs232_str = upcase(strip(rs232_str,' ',2))
- fname = slice(rs232_str,2)
-
- if left(rs232_str,3) = 'SEN' then goto SEND_FILE
- if left(rs232_str,2) = 'XM' then {
- Protocol 'CROSSTALK'
- goto SEND_FILE
- }
-
- if left(rs232_str,3) = 'REC' then goto RECV_FILE
- if left(rs232_str,3) = 'REQ' then goto RECV_FILE
- if left(rs232_str,2) = 'RC' then {
- Protocol 'CROSSTALK'
- goto RECV_FILE
- }
-
- if left(rs232_str,3) = 'PRO' then goto SET_PROTOCOL
-
- if left(rs232_str,3) = 'TYP' then goto TYPE_FILE
-
- if left(rs232_str,3) = 'DIR' then goto DIR_LIST
-
- if left(rs232_str,3) = 'CD ' then goto CHANGE_DIRECTORY
- if left(rs232_str,3) = 'CHD' then goto CHANGE_DIRECTORY
-
- if rs232_str = 'BYE' then goto END_CALL
- if left(rs232_str,3) = 'HEL' then goto HELP_TEXT
-
- -- bad command, spit out help text
- rs232_str = 'help'
-
-
- LABEL HELP_TEXT
- hname = left(slice(rs232_str,2),3)
- if null(hname) then {
- reply EOLN;'Crosstalk for Windows Answer mode commands are:';
- reply EOLN;EOLN;
- if left(Permission) = '1' then ...
- reply 'Send <filename> - tell remote system to send a file';EOLN;
- if mid(Permission,2,1) = '1' then ...
- reply 'Receive <filename> - tell remote system to receive a file';EOLN;
- if mid(Permission,3,1) = '1' then ...
- reply 'Protocol - get remote protocol setting';EOLN; ...
- else if mid(Permission,3,1) = '2' then ...
- reply 'Protocol <protocol_name> - get/set remote protocol';EOLN;
- if mid(Permission,4,1) = '1' then ...
- reply 'Type <filename> - get a text file listing';EOLN;
- if mid(Permission,5,1) = '1' then ...
- reply 'Dir <filespec> - get a directory listing';EOLN;
- if mid(Permission,6,1) = '1' then ...
- reply 'Chdir <dirname> - change remote drive/directory';EOLN;
- reply 'Bye - disconnect';EOLN;
- reply 'Help <command> - get help';EOLN;EOLN;
- return
- }
- reply EOLN;
- if hname = 'SEN' then {
- if left(Permission) = '0' then return
- reply "Send command: Type 'Send <filename>' at the 'Command:' prompt. You must";EOLN;
- reply ' specify a filename.';EOLN;EOLN;
- reply ' If you are using Xmodem, Xmodem/CRC, Xmodem/1K, Ymodem/Batch,';EOLN;
- reply " or Kermit, you must type this Send command at the 'Command:'";EOLN;
- reply ' prompt, and then initiate a Receive command on your local';EOLN;
- reply ' system to begin the transfer.';EOLN;EOLN;
- reply ' If you are using the Zmodem protocol, you must use this Send';EOLN;
- reply ' command to transfer a file from this system to your system.';EOLN;
- reply ' If your local system does not support the auto-start feature';EOLN;
- reply ' of Zmodem, you will also need to type any accompanying Receive';EOLN;
- reply ' command on your system to begin the transfer.';EOLN;
- reply ' If you are using the DART or CROSSTALK protocols, you should';EOLN;
- reply ' not use this command. To transfer a file from this system';EOLN;
- reply ' to your system, you need only initiate a Request or a Receive';EOLN;
- reply ' command on your local system. A Send command will then be';EOLN;
- reply ' sent to this system automatically, and the file transfer';EOLN;
- reply ' will begin.';EOLN;
- }
- else if hname = 'REC' then {
- if mid(Permission,2,1) = '0' then return
- reply "Receive command: Type 'Receive [<filename>]' at the 'Command:' prompt.";EOLN;EOLN;
- reply ' If you are using Xmodem, Xmodem/CRC, Xmodem/1K, Ymodem/Batch,';EOLN;
- reply " or Kermit, you must type a Receive command at the 'Command:'";EOLN;
- reply ' prompt, and then initiate a Send command on your local system';EOLN;
- reply ' to begin the transfer. The Xmodem protocols all require that';EOLN;
- reply ' a filename be specified; Ymodem/Batch and Kermit do not.';EOLN;EOLN;
- reply ' If you are using the DART, CROSSTALK or Zmodem protocols,';EOLN;
- reply ' you should not use this command. To transfer a file from';EOLN;
- reply ' your system to this system, you need only initiate a Send';EOLN;
- reply ' command on your local system. A Receive command will then';EOLN;
- reply ' be sent to this system automatically, and the file transfer';EOLN;
- reply ' will begin.';EOLN;
- }
- else if hname = 'PRO' then {
- if mid(Permission,3,1) = '0' then return
- reply "Protocol command: Type 'protocol' at the 'Command:' prompt to see the";EOLN;
- reply " remote system's current protocol setting.";EOLN;EOLN;
- if mid(Permission,3,1) = '1' then return
- reply " Type 'protocol <protocol_name>' at the 'Command:'";EOLN;
- reply ' prompt to change the file transfer protocol that';EOLN;
- reply ' the remote Crosstalk for Windows system is using.';EOLN;
- }
- else if hname = 'TYP' then {
- if mid(Permission,4,1) = '0' then return
- reply "Type command: Type 'type <filename>' at the 'Command:' prompt to get";EOLN;
- reply ' a listing of a text file sent (uploaded) to you.';EOLN;EOLN;
- reply ' If Crosstalk for Windows replies that it cannot find';EOLN;
- reply ' the file, you may need to specify a full pathname.';EOLN;
- }
- else if hname = 'DIR' then {
- if mid(Permission,5,1) = '0' then return
- if DirRestrict then {
- reply "Dir command: Type 'dir' at the 'Command:' prompt to get a";EOLN;
- reply ' directory listing from the remote system.';EOLN;EOLN;
- return
- }
- reply "Dir command: Type 'dir <filespec>' at the 'Command:' prompt to get";EOLN;
- reply " a directory listing. If you don't enter a filespec,";EOLN;
- reply ' the remote Crosstalk for Windows system will show you';EOLN;
- reply " a listing of it's current directory.";EOLN;
- }
- else if hname = 'CD ' or hname = 'CHD' then {
- if mid(Permission,6,1) = '0' then return
- reply "Chdir command: Type 'chdir <dirname>' or 'cd <dirname>' at the 'Command:'";EOLN;
- reply ' prompt to change drives or directories on the remote system.';EOLN;
- reply ' Examples: "cd \xtalk", "cd a:\", "chdir a:\xtalk".';EOLN;
- }
- else if hname = 'BYE' then {
- reply "Bye command: Type 'bye' at the 'Command:' prompt when you are";EOLN;
- reply ' ready to disconnect.';EOLN;
- }
- else rs232_str = 'HEL' : rs232_str = '' : goto HELP_TEXT
- reply EOLN;
- return
-
-
- LABEL SEND_FILE
- if left(Permission) = '0' then {
- rs232_str = 'help'
- goto HELP_TEXT
- }
- if Protocol = 'CROSSTALK' then {
- if left(rs232_str,2) <> 'XM' then {
- reply EOLN;INIT_REQU;EOLN;EOLN;
- cmd_on = false
- return
- }
- }
- else if Protocol = 'DART' then {
- if length(fname) then {
- reply EOLN;INIT_REQU;EOLN;EOLN;
- cmd_on = false
- return
- }
- }
- else if Protocol <> 'Zmodem' then {
- if null(fname) then goto NO_FNAME
- if not exists(fname) then {
- errmsg = 'File(s) not found'
- goto ERR_MSG
- }
- reply EOLN;INIT_RECV;EOLN;EOLN;
- wait 3 seconds
- }
- else reply 'rz';EOLN; : wait 5 ticks
- reply EOLN;EOLN;'Processing command ...';EOLN;EOLN;
- savdir = DirFil : send fname
- chdir savdir : DirFil = savdir
- if Protocol = 'CROSSTALK' then reply chr(3);'No more files'
- return
-
-
- LABEL RECV_FILE
- if mid(permission,2,1) = '0' then {
- rs232_str = 'help'
- goto HELP_TEXT
- }
- if Protocol = 'CROSSTALK' then {
- if left(rs232_str,2) <> 'RC' then {
- reply EOLN;INIT_SEND;EOLN;EOLN;
- cmd_on = false
- return
- }
- }
- else if Protocol = 'DART' then {
- if length(fname) then {
- reply EOLN;INIT_SEND;EOLN;EOLN;
- cmd_on = false
- return
- }
- }
- else if Protocol <> 'Zmodem' then {
- if left(Protocol,6) = 'Xmodem' and null(fname) then ...
- goto NO_FNAME
- reply EOLN;INIT_SEND;EOLN;EOLN;
- wait 3 seconds
- }
- reply EOLN;EOLN;'Processing command ...';EOLN;EOLN;
- savdir = DirFil : receive fname
- chdir savdir : DirFil = savdir
- return
-
-
- LABEL SET_PROTOCOL
- if mid(Permission,3,1) = '0' then {
- rs232_str = 'help'
- goto HELP_TEXT
- }
-
- if mid(Permission,3,1) = '1' then pname = ''
- else pname = slice(rs232_str,2)
- if null(pname) then {
- prot_is = 'Current Protocol is '+Protocol+'.'
- reply EOLN;prot_is;EOLN;EOLN;
- return
- }
-
- p1 = left(pname,2)
- p2 = right(rs232_str,3)
- pok = true
- if p1 = 'DA' then pname = 'DART'
- else if p1 = 'CR' or p1 = 'XT' then pname = 'CROSSTALK'
- else if p1 = 'XM' then {
- if p2 = 'CRC' then pname = 'Xmodem/CRC'
- else if right(p2,2) = '1K' then pname = 'Xmodem/1K'
- else pname = 'Xmodem'
- }
- else if p1 = 'YM' then pname = 'Ymodem/Batch'
- else if p1 = 'ZM' then pname = 'Zmodem'
- else if p1 = 'KE' then pname = 'Kermit'
- else pok = false
- reply EOLN;
- if pok then Protocol pname
- else reply PROTS;EOLN;EOLN;
- return
-
-
- LABEL TYPE_FILE
- if mid(Permission,4,1) = '0' then {
- rs232_str = 'help'
- goto HELP_TEXT
- }
- if length(slice(rs232_str,2,".")) > 3 then ...
- rs232_str = left(rs232_str,instr(rs232_str,".",2) + 3)
- fname = slice(rs232_str,2)
- if null(fname) then goto NO_FNAME
- reply EOLN;
- if not exists(fname) then {
- reply "Can't find file ";fname;".";EOLN;EOLN;
- return
- }
- chan = freefile
- open input fname as #chan
- if not chan then return
- row = 1
- while not eof(chan)
- read line #chan, fstr
- reply left(fstr,80);EOLN;
- if row = 22 then {
- reply '... more ... press Enter ...';
- nextline ans, 120
- reply EOLN;
- row = 0
- } else row = row + 1
- wend
- close #chan
- reply EOLN;
- return
-
-
- LABEL DIR_LIST
- if mid(Permission,5,1) = '0' then {
- rs232_str = 'help'
- goto HELP_TEXT
- }
- if DirRestrict then fspec = DirFil : fspec2 = DirFil + '\*.*'
- else {
- curpath = curdir
- if not instr(curpath,':') then curpath = curdrive + curpath
-
- fspec = slice(rs232_str,2)
- if null(fspec) or fspec = '*.*' then fspec = curpath
- else if mid(fspec,2,1) <> ':' then ...
- if left(fspec) = '\' then fspec = curdrive + fspec
- else if right(curpath) = '\' then fspec = curpath + fspec
- else fspec = curpath + '\' + fspec
-
- fspec2 = fspec
- if right(fspec) = '\' or right(fspec) = ':' then ...
- fspec2 = fspec + '*.*'
- else if not instr(fspec,'*') then ...
- if fileattr(fspec,10h) & 10h = 10h then ...
- fspec2 = fspec + '\*.*'
- }
- reply EOLN;'Directory of ';fspec;EOLN;EOLN;
- fname = filefind(fspec2,10h)
- if null(fname) then {
- reply 'File(s) not found.';EOLN;EOLN;
- return
- }
- row = 3
- repeat
- if fileattr & 10h then {
- spcs = 24 - length(fname)
- reply fname;pad('',spcs,' ',1);'<DIR>';EOLN;
- } else reply fname;EOLN;
- if row = 22 then {
- reply ' ... more ... press Enter ...';
- nextline ans, 120
- reply EOLN;
- row = 0
- } else row = row + 1
- fname = filefind
- until null(fname)
- reply EOLN;
- return
-
-
- LABEL CHANGE_DIRECTORY
- reply EOLN;
- if mid(Permission,6,1) = '0' then {
- rs232_str = 'help'
- goto HELP_TEXT
- }
- dn = slice(rs232_str,2)
- if null(dn) then {
- reply 'Error: directory name required.';EOLN;EOLN;
- return
- }
-
- curpath = curdir
- if left(curpath) = '\' then curpath = curdrive + curpath
-
- if mid(dn,2,1) <> ':' then ...
- if left(dn) = '\' then dn = curdrive + dn ...
- else if right(curpath) = '\' then dn = curpath + dn ...
- else dn = curpath + '\' + dn ...
- else if length(dn) = 2 then dn = dn + '\'
-
- if not exists(dn,10h) then {
- if right(dn) = '\' then fn = dn + '*.*'
- else fn = dn + '\*.*'
- if not exists(fn) then {
- reply 'Error: invalid drive or directory.';EOLN;EOLN;
- return
- }
- }
-
- if upcase(left(dn,2)) <> curdrive then drive left(dn)
- DirFil = dn : chdir dn
- return
-
-
- LABEL NO_FNAME
- reply EOLN;'Error: filename required.';EOLN;EOLN;
- return
-
-
- LABEL OPEN_LOG
- if length(Logfile) then {
- f = freefile
- open output Logfile as #f
- write line #f, 'Date of Call Time of Call Time Online'
- close #f
- }
- return
-
-
- label LOG_CALL
- if length(Logfile) then {
- f = freefile
- open append Logfile as #f
- write line #f, pad(cdate,15)+pad(ctime,15)+hms(ontime,2)
- write line #f, ''
- close #f
- }
- return
-
-
- label CHECK_BYE
- alert 'Do you wish to disconnect?', 'Yes', 'No', Cancel
- if choice = 3 then return
- gosub LOG_CALL
- if choice = 2 then end
- goto RESET_MODEM
-
-
- LABEL END_CALL
- bye
- wait 1 second
- e = error
- gosub LOG_CALL
- pop
- wait 5 seconds
- return
-
-
- LABEL RESET_MODEM
- -- Don't do anything if direct-connect
- if Local then goto END_ANSWER
-
- -- Is Modem Hayes compatible?
- if right(ModemName, 5) = '2224B' then goto END_ANSWER
- if right(ModemName, 4) = '7407' then goto END_ANSWER
- if right(ModemName, 4) = 'MPDM' then goto END_ANSWER
- if left(ModemName, 6) = 'Bytcom' then goto END_ANSWER
- if left(ModemName, 7) = 'Concord' then goto END_ANSWER
- if ModemName = 'DCA 911' then goto END_ANSWER
- if left(ModemName, 7) = 'IBM Con' then goto END_ANSWER
- if left(ModemName, 3) = 'Nov' then goto END_ANSWER
- if right(ModemName, 4) = '3451' then goto END_ANSWER
- if right(ModemName, 6) = 'VA-212' then goto END_ANSWER
- if ModemName = 'CUSTOM' and not instr(AnswerSetup, 'ATS0') then ...
- goto END_ANSWER
-
- -- Tell Hayes compatibles to stop answering calls
- reply 'ATS0=0'
- wait 1 second
-
- LABEL END_ANSWER
- bye
- wait 1 second
- e = error
- cls
- end
-
-