Here, if you want anything changed just say so
'hol
'1.0
'&Host List:Hero:Lists hosts in the channel
Private hol_Access_AddHost
Private hol_Access_Hosts
Private hol_Command_AddHost
Private hol_Command_Hosts
hol_Command_AddHost = "addhost"
hol_Access_AddHost = 20
hol_Command_Hosts = "host"
hol_Access_Hosts = 0
Sub hol_Event_Usertalk(userName, userFlags, textRecieved, userPing)
Dim objFSO, textStream, accessNum, accessFlags, out, textContent
Set objFSO = CreateObject("Scripting.FileSystemObject")
GetDBEntry userName, accessNum, accessFlags
If LCase(Left(Trim(textRecieved), Len(BotVars.Trigger & hol_Command_AddHost))) = LCase(BotVars.Trigger & hol_Command_AddHost) AND CInt(accessNum) >= CInt(hol_Access_AddHost) Then
If UBound(Split(textRecieved)) > 0 Then
Set textStream = objFSO.OpenTextFile(BotPath & "HostList.txt", 8, True)
textStream.WriteLine Split(textRecieved)(1)
textStream.Close
Dsp 3, "Added host.", Username, vbGreen
Else
Dsp 3, "Please specify a user to add as a host.", Username, vbGreen
End If
ElseIf LCase(Left(Trim(textRecieved), Len(BotVars.Trigger & hol_Command_Hosts))) = LCase(BotVars.Trigger & hol_Command_Hosts) AND CInt(accessNum) >= CInt(Replace(hol_Access_Hosts, 0, -1)) Then
Set textStream = objFSO.OpenTextFile(BotPath & "HostList.txt", 1, True)
If Not textStream.AtEndOfStream Then
textContent = Split(textStream.ReadAll, vbNewLine)
For i = 0 To UBound(textContent)
For j = 1 To GetInternalUserCount()
If LCase(textContent(i)) = LCase(GetNameByPosition(j)) Then
out = out & GetNameByPosition(j) & ", "
End If
Next
Next
End If
textStream.Close
If out = vbNullString Then
AddQ "There are no hosts in the channel."
Else
AddQ "Hosts: " & Left(out, Len(out) - 2)
End If
End If
End Sub