i am haveing problems wit a small script i would like to use for some op rules in my dc hub v.1 its realy bugging.me
i have made sure the oprules.txt file is in the correct path
C:\Program Files\Direct Connect Hub\Scripts
i unstand that the oprules are supppose come up as an private message
when i type +oprules which is the command to read the op rules nothing happens.
please please can anyone help many thanks shaun
' This script find and reads a specific .txt file
' And displays the content as a private message
' Works great in addition to general bot
'
' add as many commands as nessesary just make sure the .txt file exists
' and that "(sTheText, 6)))" is correct (number of letters in the command
' Make sure the loggpath is correct
'
' Made by: Gadget and Manic_Depresiv_Santa
'
Dim sBotName, LoggPath
Sub Main()
sBotName="Op Rules" '<---- The HelperBots name
LoggPath = "C:\Program Files\Direct Connect Hub\scripts" '<---- Path to the .txt file
End Sub
Sub DataArival(curUser, sCurData)
If (Left(sCurdata, 1) = "<") Then
lPos = InStr(1, sCurData, "> ")
sTheText = Mid(sCurData, lPos + 2)
'------------------Only OPs can use these commands-------------------------------
if (lcase(Left(sTheText,
curUser.PrivateMessage cstr(sBotName), cstr(Read("oprules.txt"))
End If
End If
End Sub
Function Read(TextFile)
Dim temp
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.OpenTextFile(LoggPath & TextFile, 1, false)
temp = a.ReadAll
a.Close
Set a = nothing
Set fs = nothing
Read = temp
End Function