function CallBack_Phone_Number_Valid ( \ Phone_Number as string ) \ as boolean ////////////////////////////////////////////////////////////////////// CallBack_Phone_Number_Valid = false ? "Please enter the phone number: "; input Phone_Number if Phone_Number <> "" then CallBack_Phone_Number_Valid = true end if end function sub CallBack_Response ( \ Wait_Time as real ) ////////////////////////////////////////////////////////////////////// dim Key_In as string*1 dim Time_Out as real ////////////////////////////////////////////////////////////////////// Color ( 10 ) ? "Waiting for response" Color ( 9 ) Time_Out = Timer + Wait_Time do Key_In = UCase ( InComm ) ? Key_In; loop until ( Timer >= Time_Out ) ? Color ( 10 ) end sub function CallBack_Successful ( \ byval Phone_Number as string ) \ as boolean ////////////////////////////////////////////////////////////////////// dim Key_In as string*1 dim Time_Out as real ////////////////////////////////////////////////////////////////////// CallBack_Successful = false Color ( 10 ) CarrierCheck ( Off ) ? "Hanging up..."; HangUp ? "done." ? "Delaying..." Delay ( 5 ) ? "done." ? "Sending ATH0^M" Send ( "ATH0" + Chr ( 13 ) ) CallBack_Response ( 5.0 ) ? "Sending ATM1^M" Send ( "ATM1" + Chr ( 13 ) ) CallBack_Response ( 5.0 ) ? "Sending ATDT" + Phone_Number + "^M" Send ( "ATDT" + Phone_Number + Chr ( 13 ) ) CallBack_Response ( 10.0 ) ? "Sending name verification" Send ( "Are you " + User.Name + " (y/n)?" + Chr ( 13 ) ) ? "Waiting for response" Time_Out = Timer + 30.0 do Key_In = UCase ( InComm ) ? Key_In; loop until ( InStr ( "YN", Key_In ) > 0 ) \ or ( Timer >= Time_Out ) ? ? "Hanging up..."; Hangup ? "done." CallBack_Successful = ( Key_In = "Y" ) end function function CallBack_Upgrade \ as boolean ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// CallBack_Upgrade = false ? "Upgrading security level..."; User.SecLevel = "FULLUSER" ? "done." CallBack_Upgrade = true end function sub CallBack_Verify ////////////////////////////////////////////////////////////////////// dim Phone_Number as string ////////////////////////////////////////////////////////////////////// if CallBack_Phone_Number_Valid ( Phone_Number ) then if CallBack_Successful ( Phone_Number ) then CallBack_Upgrade end if end if end sub sub CallBack_Start ( \ byval Registration as string, \ byval Copyright as string ) ////////////////////////////////////////////////////////////////////// cls if not User_Is_Sysop then ? "SysOps only for now. We're still programming this." WaitEnter exit sub end if ? Copyright; ". Registered to "; Registration; "." ? if InputYesNo ( \ "Would you like your phone number verified? (y/N): ", \ false ) then CallBack_Verify end if end sub