Declare Function AddToDoList16 Pascal Lib "addons.dll" Alias "AddToDoList" (ByVal szService As String, ByVal szFileName As String, ByVal szMailname As String, ByVal iFlags As Long) As Integer
Declare Function AddToDoList32 Pascal Lib "addons32.dll" Alias "AddToDoList" (ByVal szService As String, ByVal szFileName As String, ByVal szMailname As String, ByVal iFlags As Long) As Long
'T:iFlags for CIX (constant)
'iFlags
Global Const IM_DELETE = 2048 ' Delete scratchpad file afterwards?
Dim lastprompt As String 'Tracker name of the last prompt encountered
Dim MailID As String 'ID of current mail or deferred command
Dim Success As Boolean 'Whether command succeeded
Dim Failure As String 'Reason command failed (CIX error message)
Dim sctrack As Tracker 'Success/Failure tracker
Dim messagescript As String 'File name of CIX script to upload
Dim DownloadFTPid As String 'Deferred FTPDown command ID
Dim SeenFTPFile As Boolean 'There are some FTP files to download
Dim LastArea As String 'Main or Newsnet
Declare Function UniqueFileName$
Declare Function QueueFile(service As String, sfilename As String, _
queueflags As Long) As Boolean
Declare Sub ReportSuccess(id As String)
Declare Sub GetToMainPrompt
'T:ModerateConference (function) (CIX)
Function ModerateConference(id As String, conference As String)
GotoArea "Main"
Comms.Send "mod " + conference + "\r"
WaitForPrompt "Prompt"
If PromptMatches("PromptMod") Then
ModerateConference = True
Else
ModerateConference = False
ReportFailure id, "Conference not found"
If Not PromptMatches("PromptMain") Then
GetToMainPrompt
End If
EatExtraPrompts
End If
End Function
'T:ModWithdraw (subroutine) (CIX)
Sub ModWithdraw(id As String, topic As String, message As String, _
user As String, filename As String)
Dim fname As String
If Not JoinConference(id, topic) Then Exit Sub
Trackers("YES").active = True
Comms.Send "withdraw " + message + "\r"
WaitForPrompt "Prompt"
Trackers("YES").active = False
Comms.Send "file " + message + "\r"
WaitForMainPrompt
fname = UniqueFileName$()
If Not DownloadScratchpad(id, fname) Then Exit Sub
If Not QueueFile(Session.Service, fname, IM_DELETE) Then
ReportFailure id, "Empty scratchpad or download failure"
Exit Sub
End If
Comms.Send "killscratch\r"
WaitForMainPrompt
Comms.Send "mail to " + user + "\r"
UploadMailMessage "MESSAGE WITHDRAWN", "In " + topic + "\rMessage #" + message + " has been withdrawn.\r\r.", filename
ReportSuccess id & " : withdrew #" & message & " from " & topic
EatExtraPrompts
End Sub
'T:ModAddPerson (subroutine) (CIX)
Sub ModAddPerson(id As String, conference As String, user As String, _
message As String)
If Not ModerateConference(id, conference) Then Exit Sub
Comms.Send "add part " + user + "\r"
WaitForMainPrompt
Comms.Send "mail to " + user + "\r"
UploadMailMessage "Addpart Notification", _
"You have been joined to conference "+conference+"\r", _
message
ReportSuccess id & " : Added " & user & " to " & conference
EatExtraPrompts
End Sub
'T:ModAddPart (subroutine) (CIX)
Sub ModAddPart(id As String, conference As String, users As String)
If Not ModerateConference(id, conference) Then Exit Sub
Comms.Send "add part " + users + "\r"
WaitForMainPrompt
ReportSuccess id & " : Added " & users & " to " & conference
EatExtraPrompts
End Sub
'T:ModRemPart (subroutine) (CIX)
Sub ModRemPart(id As String, conference As String, users As String)
If Not ModerateConference(id, conference) Then Exit Sub
Comms.Send "rem part " + users + "\r"
WaitForMainPrompt
ReportSuccess id & " : Removed " & users & " from " & conference
EatExtraPrompts
End Sub
'T:AddTopicToConference (subroutine) (CIX)
Sub AddTopicToConference(id As String, conference as String, topic As String, _
topicdesc As String, flist As String)
Dim ctopic As String
Dim tNameOK As Tracker, tNameBad As Tracker
GotoArea "Main"
ctopic = conference + "/" + topic
WaitFor "opicname:"
Set tNameOK = CreateTracker("PromptNameOK", "FLIST) (y/n)? N")
Set tNameBAD = CreateTracker("PromptNameBAD", "another topicname:")
Comms.Send topic + "\r"
WaitForPrompt "PromptName"
If PromptMatches("PromptNameOK") then
'WaitFor "FLIST) (y/n)? N"
Comms.Send flist + "\r"
WaitFor ":"
Comms.SendLiteral topicdesc
Comms.Send "\r"
WaitFor "opicname:"
Comms.Send "q\r"
Terminal.Status "CIX is adding participants to the new topic, please wait"