2009-08-17 17:38:51 UTC
I wonder about difference between these commands in the HexScript plugin, cause I wrote a script to fix the $UserIP bug. But when i use SendData. it causes no effect, but with Broadcast this command works correctly.
Some code:
OnUserJoined = function (iUserId)
local usr = Hex.User(iUserId)
local ops={}
local ips=""
nickr = usr:GetNick()
ipr = usr:GetIPString()
while bResult == true do
if tusr:GetAccessLevel()>20000 then table.insert(ops,tusr:GetUserID()) end
bResult = tusr:Next()
end
ips="$UserIP "..nickr.." "..ipr.."$$|"
for id=1,#ops do
print(Hex.User(ops[id]):GetNick())
Hex.User(ops[id]):SendData(ips)
-- Hex.Broadcast(ips)
end
nickr and ipr contains thing of the user, that was just connected.