home *** CD-ROM | disk | FTP | other *** search
- /* AutoLogin by Bob Maple © 1993 bmaple@burner.com
-
- AutoLogin_CFG:
- --------------
-
- For those familiar with UUCP, this file is like the L.sys file.
-
- This file consists of a system name, followed by send/expect strings
- necessary to log you into the BBS, starting with an expect string.
-
- \u Send 'UserName' as defined in TERM
- \p Send 'Password' as defined in TERM
- <NULL> Valid on expect only.. means 'look for nothing'
- ^M Sends a return.
-
- Example:
-
- unix ogin: \u^M ssword: \p^M
- Burner ESC ^M name \u^M password \p^M
- TVLand <NULL> ^M erminal i alias \u^M ssword \p^M
- */
-
- IdleOut = 5 /* How long should AutoLogin wait for an expect string */
- /* before giving up and sending it anyway? */
-
-
- options results
-
- getattr TERM.SESSION.BBSNAME
- system = result
-
- call open file, ('TERM:AutoLogin_CFG'), "R";stop = 0
-
- TIMEOUT SEC IdleOut
-
- do until stop = 1
-
- foo = readln(file);if upper(left(foo,length(system))) = upper(system) then do
-
- say "Logging into "system"..";say
-
- stop = 1
- args = words(foo)
-
- do i = 2 to args by 2
-
- expt = word(foo,i)
- sendit = word(foo,i+1)
-
- say "Expect: "left(expt,10)" Send: "sendit
-
- if expt ~= '<NULL>' then do
-
- CLEAR wait
- ADDITEM TO wait NAME expt
- wait
-
- end
-
- SEND sendit
-
- end
- end
- end
-
- call close file
-