home *** CD-ROM | disk | FTP | other *** search
/ .net 1999 December / netCD65.iso / pc / Software / VirtualA / 32bit / vasetup.exe / %MYDIR% / ADMIN.EBS next >
Encoding:
Text File  |  1999-10-06  |  5.2 KB  |  185 lines

  1. 'T:ADMIN.EBS for CIX
  2. ' VA 4.52 release
  3.  
  4. Declare Function AddFileToMessageBase(topic As String, subject As String, filename As String)
  5.  
  6. 'T:GetAllTopics (subroutine) (CIX)
  7. Sub GetAllTopics(id As String, ndays As String)
  8.     Dim back As String
  9.  
  10.     If ndays = "" Or ndays = "0" Then
  11.         back = "back 2"
  12.     Else
  13.         back = "to back " + ndays
  14.     End If
  15.     GotoArea "Main"
  16.     Comms.Send "order first cixnews\r"
  17.     WaitForMainPrompt
  18.     Comms.Send "macro jklm hea skip " + back + " tnext jklm\r"
  19.     WaitForMainPrompt
  20.     'Set CIX to timeout after 5 mins - gives script time to process
  21.     Comms.Send "opt timeout 5 quit\r"
  22.     WaitForMainPrompt
  23.     If Not JoinConference(id, "cixnews/information") Then Exit Sub
  24.     Terminal.Status "CIX is processing all your topics, please wait"
  25.     Comms.Send "file jklm\r"
  26.     TimedWaitForMainPrompt 3000
  27.     Comms.Send "killscratch\r"
  28.     WaitForMainPrompt
  29.     If Instr(back, "to") then
  30.         ReportSuccess id & " : Pointers set back 1 messages in all joined topics on CIX"
  31.     Else
  32.         ReportSuccess id & " : Set pointers back " & ndays & " Days in all joined topics on CIX"
  33.     End If
  34.     EatExtraPrompts
  35.     Terminal.Status ""
  36. End Sub
  37.  
  38. 'T:GetProfileForEdit (subroutine) (CIX)
  39. Sub GetProfileForEdit(id As String, filename As String)
  40.     GotoArea "Main"
  41.     Comms.Send "scget profile\r"
  42.     WaitForMainPrompt
  43.     Comms.Send "download\r"
  44.     Trackers("YES").active = True
  45.     WaitFor "\*\*"
  46.     DeleteFile Session.ServicePath + filename
  47.     FileDownload PROT_ZMODEM, Session.ServicePath + filename
  48.     WaitForMainPrompt
  49.     Trackers("YES").active = False
  50.     ReportSuccess id & " : Downloaded Profile to " & filename
  51.     EatExtraPrompts
  52. End Sub
  53.  
  54. 'T:ReplaceProfile (subroutine) (CIX)
  55. Sub ReplaceProfile(id As String, filename As String)
  56.     GotoArea "Main"
  57.     Comms.Send "upload\r"
  58.     WaitFor "X)"
  59.     FileUpload PROT_ZMODEM, filename
  60.     WaitForMainPrompt
  61.     Comms.Send "scput profile\r"
  62.     WaitForMainPrompt
  63.     ReportSuccess id & " : Uploaded " & filename & " as CIX Profile"
  64.     EatExtraPrompts
  65. End Sub
  66.  
  67. 'T:SetAbsence (subroutine) (CIX)
  68. Sub SetAbsence(id As String, startdate As String, enddate As String)
  69.     GotoArea "Main"
  70.     Comms.Send "absence "
  71.     If startdate<>"" Then Comms.Send "first " + startdate
  72.     If enddate<>"" Then Comms.Send " last " + enddate
  73.     Comms.Send "\r"
  74.     WaitForMainPrompt
  75.     ReportSuccess id & " : Set Absence from " & startdate & " to " & enddate
  76.     EatExtraPrompts
  77. End Sub
  78.  
  79. 'T:CIXoption (subroutine) (CIX)
  80. Sub CIXoption(id As String, opt As String)
  81.     GotoArea "Main"
  82.     Comms.Send "opt " + opt + "\r"
  83.     WaitForMainPrompt
  84.     ReportSuccess id & " : Set CIX Option " & opt
  85.     EatExtraPrompts
  86. End Sub
  87.  
  88. Sub ChangePassword(id As String, oldpassword As String, newpassword As String)
  89.     Dim capname As String
  90.     
  91.     GotoArea "Main"
  92.     capname = Session.ServicePath + "password.tmp"
  93.     Capture CAPTURE_ON, capname
  94.     Comms.Send "password\r"
  95.     WaitFor "ld password:"
  96.     Comms.SendLiteral oldpassword
  97.     Comms.Send "\r"
  98.     WaitFor "ew password:"
  99.     Comms.SendLiteral newpassword
  100.     Comms.Send "\r"
  101.     WaitFor "e-enter new password:"
  102.     Comms.SendLiteral newpassword
  103.     Comms.Send "\r"
  104.     WaitForMainPrompt
  105.     Capture CAPTURE_OFF
  106.     If AddFileToMessageBase("actions/information", "Log of Password Change", capname) Then
  107.         ReportSuccess id & " : Changed CIX Password.  Remember to update Comms Settings"
  108.     Else
  109.         ReportFailure id, Error$
  110.     End If
  111. End Sub
  112.  
  113. 'T:ReconstructTopic (subroutine) (CIX)
  114. Sub ReconstructTopic(id As String, topic As String, recent As String)
  115.     GotoArea "Main"
  116.     If Not JoinConference(id, topic) Then Exit Sub
  117.     Comms.Send "hea skip to " + Str$(recent) + "\r"
  118.     WaitForMainPrompt
  119.     ReportSuccess id & " : Reconstructed " & topic
  120.     EatExtraPrompts
  121. End Sub
  122.  
  123. 'T:Reconstruct (subroutine) (CIX)
  124. Sub Reconstruct(id As String)
  125.     GotoArea "Main"
  126.     Comms.Send "killscratch\r"
  127.     WaitForMainPrompt
  128.     Comms.Send "upload\r"
  129.     WaitFor "X)"
  130.     FileUpload PROT_ZMODEM, _
  131.         ReadIni$("Main", "Message Path", Session.inifilename)+"point.bsc"
  132.     WaitForPrompt "Prompt"
  133.     Comms.Send "scput script\r"
  134.     WaitForPrompt "Prompt"
  135.     Comms.Send "file time\r"
  136.     WaitForPrompt "Prompt"
  137.     Comms.Send "script\r"
  138.     Terminal.Status "Processing script, please wait"
  139.     TimedWaitForMainPrompt 600 ' 10 minutes
  140.     DownloadMessage id
  141.     EatExtraPrompts
  142.     Terminal.Status ""
  143. End Sub
  144.  
  145. 'T:SetupWizard (subroutine) (CompuServe)
  146. Sub SetupWizard(mailname As String, organisation As String)
  147.     ReportSuccess ""
  148. End Sub
  149.  
  150. 'T:CreateAccount (subroutine) (CompuServe)
  151. Sub CreateAccount
  152.     ManualTerminal
  153. End Sub
  154.  
  155. 'T:ForwardToggle (subroutine) (CIX)
  156. Sub ForwardToggle(id As String)
  157.     GotoArea "Main"
  158.     Comms.Send "go forward_toggle\r"
  159.     WaitForMainPrompt
  160.     ReportSuccess id & " : Toggled mail forwarding"
  161.     EatExtraPrompts
  162. End Sub
  163.  
  164. 'T:ForwardCheck (subroutine) (CIX)
  165. Sub ForwardCheck(id As String)
  166.     Dim t1 As Tracker, t2 As Tracker
  167.  
  168.     GotoArea "Main"
  169.     Set t1 = CreateTracker("ForwardConf", "CIX Conferencing", "")
  170.     Set t2 = CreateTracker("ForwardInternet", "CIX Internet", "")
  171.     Comms.Send "go forward_check\r"
  172.     WaitForPrompt "Forward"
  173.     If PromptMatches("ForwardInternet") Then
  174.         ReportSuccess id & " : Mail forwarding is set to go to your CIXIP account"
  175.     Else
  176.         ReportSuccess id & " : Mail forwarding is set to go to your CIX account"
  177.     End If
  178.     t1.delete
  179.     t2.delete
  180.     WaitForMainPrompt
  181.     EatExtraPrompts
  182. End Sub
  183.  
  184.  
  185.