anybody that can convert this to new api
cmdBlock = "!block"
cmdUBlock = "!unblock"
tBlocked = {}
tCanCommand = {
[-1] = 0,
[0] = 1,
[1] = 1,
[2] = 0,
[3] = 0,
[4] = 0,
[5] = 1,
}
NewUserConnected = function(User)
if tCanCommand[User.iProfile] == 1 then
User:SendData("$UserCommand 1 3 Block user' Downloads$<%[mynick]> "..cmdBlock.." %[nick]||")
User:SendData("$UserCommand 1 3 Unblock user' Downloads$<%[mynick]> "..cmdUBlock.." %[nick]||")
end
end
OpConnected = NewUserConnected
ConnectToMeArrival = function(User,Data)
if tBlocked[User.sName] ~= nil then return 1 end
end
RevConnectToMeArrival = ConnectToMeArrival
MultiConnectToMeArrival = ConnectToMeArrival
ChatArrival = function(User,Data)
local _,_,sCmd,sArgs = string.find(Data, "%b<>%s(%S+)%s+(%S+)|")
if sCmd == cmdBlock and tCanCommand[User.iProfile] == 1 then
tBlocked[sArgs] = 1
SendToAll(frmHub:GetHubBotName(), "The nickname "..sArgs.." is now blocked from downloading in this hub")
return 1
elseif sCmd == cmdUBlock and tCanCommand[User.iProfile] == 1 then
if tBlocked[sArgs] ~= nil then
tBlocked[sArgs] = nil
SendToAll(frmHub:GetHubBotName(), "The nickname "..sArgs.." is no longer blocked and can download again")
else
User:SendPM(frmHub:GetHubBotName(), "That nickname ( "..sArgs.." ) wasn't blocked")
end
return 1
end
end
I think this script is with similar function is already on forums...
try searching there if u really need it...