home *** CD-ROM | disk | FTP | other *** search
- ' Login procedure for telnet Cix
-
- Declare Sub LogResult(result As String)
- Declare Function WaitForEitherTimed(s1 As String, s2 As String, timeout As Integer) As String
-
- 'T:SendRlogin (subroutine) (CIX)
- Sub SendRloginCIX(t As Tracker)
- Comms.Send "rlogin 194.153.0.50\r"
- t.reset
- End Sub
-
- 'T:SendRlogin (subroutine) (CIX)
- Sub SendRloginTOM(t As Tracker)
- Comms.Send "rlogin 194.153.0.51\n"
- t.reset
- End Sub
-
- Function Login()
- Dim t As Tracker
- Dim LineEnd as String
- Dim DialString as String
-
- 'If connecting to tom then use \r not \n
- DialString = LCase(ReadIni$(Session.IniSection, "Phone", Session.IniFileName))
- if InStr(DialString, "tom.") > 0 Then
- LineEnd = "\n"
- Set t = CreateTracker("AnnexPrompt", "\nannex:", "SendRloginCIX")
- else
- LineEnd = "\r"
- Set t = CreateTracker("AnnexPrompt", "\nannex:", "SendRloginTOM")
- End If
-
- On Error Goto Login_error
- If Not RepeatWaitWithKick("ogin:", LineEnd, 2) Then
- t.delete
- Login = False
- Exit Function
- End If
- t.delete
- Comms.Send "qix" + LineEnd
- WaitForTimed "new user)", 900
- Comms.Send Session.LoginName + LineEnd
- If Session.Password<>"" Then
- If WaitForEitherTimed("assword:", "Your pointers", 300)<>"assword:" Then
- LogResult "Your pointers are being updated. Please try again in a few minutes."
- Login = False
- Exit Function
- End If
- Comms.SendEncrypted Session.Password
- Comms.Send LineEnd
- End If
- Login = True
- Exit Function
- Login_Error:
- If Err <> 1002 Then LogResult "Error " + Str$(Err) + ":" + Error$ + Basic.Eoln$ + "While trying to log on"
- Login = False
- Exit Function
- End Function
-
-