any1 gt this...
huh, tis built into the hub software, just enable it icecube 4 above i think
ye itz ther but it doesnt seem to work :S. no other op can recieive a msg wen u write smin in ther :S.
hmmmmm
u should try downloading the software again. or the script which does vipchat u can change it 2 opchat. i can't be bothered uploading it so i will upload it afterwards. :D
here it is. i have changed it so it is like opchat.
BotName = "{?2?M}?OpChat"
function Main()
frmHub:RegBot(BotName)
end
function DataArrival(curUser,data)
local MessageRecognized = 0
if isPM(data)==1 then
whoto,from,message=ParsePM(data)
MessageRecognized=1
end
if MessageRecognized==1 and whoto==BotName then
if (curUser.iProfile>=0 and curUser.iProfile<=2) then
local sus=GetUsersByProfile("Master")
local sops=GetUsersByProfile("SuperOp")
local ops=GetUsersByProfile("Operator")
for i, n in sops do
if n == curUser.sName then
else
SendPmToNick(n, BotName, from.." -> "..message)
end
end
for i, n in sus do
if n == curUser.sName then
else
SendPmToNick(n, BotName, from.." -> "..message)
end
end
for i, n in ops do
if n == curUser.sName then
else
SendPmToNick(n, BotName, from.." -> "..message)
end
end
end
end
end
function ParsePM(data)
s,e,whoTo,from,message = strfind(data,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.*)")
message = strsub(message,1,strlen(message)-1)
return whoTo,from,message
end
function isPM(data)
if( strsub(data, 1, 3) == "$To" ) then
return 1
else
return 0
end
end
Or maybe this ??
I dont now but this works werry nice ;)
BOT_Chat = "Op-Chat"
function Main()
frmHub:RegBot(Bot_Chat)
end
function DataArrival(curUser,sdata)
if curUser.iProfile == 0 or curUser.iProfile == 1 then
if strsub(sdata, 1, 5) == "$To: " and strsub(sdata, 6, strlen(BOT_Chat) + 5) == BOT_Chat then
sdata = strsub(sdata, 1, strlen(sdata) - 1)
local _,_,whoTo,from,msg = strfind(sdata,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.+)")
aProfiles = GetProfiles()
for i = 0, getn(aProfiles) do
if aProfiles[i] == "Master" or
aProfiles[i] == "Operator" then
local aUsers = GetUsersByProfile(aProfiles[i])
for i = 0, getn(aUsers) do
if aUsers[i] ~= from then
local user = GetItemByName(aUsers[i])
if user then
user:SendData("$To: "..aUsers[i].." From: "..BOT_Chat.." $<"..from.."> "..msg)
end
end
end
end
end
end
end
end