Question for gadget...

Which hub software is the best? Where can I find script XXX? Discuss it here...(no, this is not for advertising your hub...)

Moderator: Moderators

dmx00830
Posts: 7
Joined: 2003-02-08 19:35

Question for gadget...

Post by dmx00830 » 2003-02-16 06:16

About a week ago i asked for a script that would allow OPs(like me) in a hub to mass message everyone....and you gave me a link (http://gadget.no-ip.info/scripts/Hub-Ma ... age.script)...which works real good, except the way we set it up was to have more then 2 admins...what happens is that it only sends the mass message to the OPs in the room, and no users at all...here is our code...your help would be greatly appreciated..thank you..

-------------------------------------------------------------------------------------

'Mass-Message 1.0 by Gadget <gadget@finx.org> http://gadget.no-ip.info
Dim sBotName, aPowerOps, iCount, sLast

Sub Main()
sBotName = "Hub-Mass-Message"
aPowerOps = Array("Mattâ„¢","[Cable]Ezflow", "Snuggly_Soft", "DaRkDrAgN", "Synthetick^Freak", "DMX_00830")
Show()
tmrScriptTimer.Interval = 60000
tmrScriptTimer.Enabled = True
End Sub
Sub tmrScriptTimer_Timer()
Show()
End Sub

Sub DataArival (curUser, sCurData)
If Left(sCurData,Len(sBotName)+6)="_To: "+sBotName+" " Then
If bIsPowerOp(curUser.sName) Then
Call OpMessage(Mid(CStr(sCurData),inStr(CStr(sCurData),">")+2))
curUser.PrivateMessage cStr(sBotName),"Message sent to "+cStr(iCount)+" operators."
sLast=curUser.sName
ElseIf curUser.bOperator Then
If colUsers.Online(cStr(sLast)) Then
colUsers.ItemByName(cStr(sLast)).PrivateMessage cStr(sBotName),"<"+cStr(curUser.sName)+"> "+cStr(Mid(CStr(sCurData),inStr(CStr(sCurData),">")+2))
End If
End If
End If
If Left(sCurData,1)="<" Then
If bIsPowerOp(curUser.sName) Then
s=Mid(CStr(sCurData),InStr(CStr(sCurData),">")+2)
End If
If InStr(s," ") Then
sCmd=LCase(Left(s,InStr(s," ")-1))
sMsg=Mid(s,InStr(s," ")+1)
If sCmd="massmessage" Then
Call MassMessage(sMsg)
curUser.PrivateMessage cStr(sBotName),"Message sent to "+cStr(iCount)+" users."
sLast=curUser.sName
End If
If sCmd="opmessage" Then
Call OpMessage(sMsg)
curUser.PrivateMessage cStr(sBotName),"Message sent to "+cStr(iCount)+" operators."
sLast=curUser.sName
End If
End If
End If
End Sub

Function bIsPowerOP(sUser)
bIsPowerOP=False
For i=0 to UBound(aPowerOps)
If LCase(cStr(sUser))=LCase(cStr(aPowerOps(i))) Then bIsPowerOP=True
Next
End Function

Sub MassMessage(sMessage)
iCount=0
For each sUser in colUsers
sUser.SendData "_Hello "+cstr(sBotName)+"__MyINFO _ALL "+cstr(sBotName)+" _ ___0__"
sUser.PrivateMessage cStr(sBotName),cStr(sMessage)
iCount=iCount+1
Next
End Sub

Sub OpMessage(sMessage)
iCount=0
For each sUser in colUsers
If sUser.bOperator Then
sUser.SendData "_Hello "+cstr(sBotName)+"__MyINFO _ALL "+cstr(sBotName)+" _ ___0__"
sUser.PrivateMessage cStr(sBotName),cStr(sMessage)
iCount=iCount+1
End If
Next
End Sub

Sub Show()
For i=0 to UBound(aPowerOps)
If colUsers.Online(cStr(aPowerOps(i))) Then
colUsers.ItemByName(cStr(aPowerOps(i))).SendData "_Hello "+cstr(sBotName)+"__MyINFO _ALL "+cstr(sBotName)+" _ ___0__"
End If
Next
End Sub :?: :?:

dmx00830
Posts: 7
Joined: 2003-02-08 19:35

Sorry about the double post...

Post by dmx00830 » 2003-02-16 06:18

Please have an admin delete one...thanks

Gadget
Posts: 62
Joined: 2003-01-11 11:24
Location: Finland

Post by Gadget » 2003-02-18 02:30

Looks like all the dollar symbols are gone, if it looks the same in script host, download it again. You can set as many admins as you like to.

Who is online

Users browsing this forum: Google [Bot] and 0 guests