I would very much appreciate the help of an expert on creating the following:
Should a new (even non-registered) user log on, I would like to consider that he/she will not be checked on the number of slots for those hubs in which he/she is OP.
After all, it would be like asking the busdriver if he has 'a ticket'. :(
IF.... the user is also an OP, then the number of slots for the OP-hubs should be subtracted from the 'usual' number of slots.
I believe this could be a very 'honest' script. Not taking into account that some user might take the effort to open his own 3 hubs (fakes) just to eliminate the slot count.
Thanks in advance experts! (Nah.... I mean it!!)
Hi,
I understood you don?t want to check the OPs from the other HUBs. You want to subtrate slot per hub right ????
Best regards, nErBoS
I am interested in this too...
QuoteOriginally posted by nErBoS
Hi,
I understood you don?t want to check the OPs from the other HUBs. You want to subtrate slot per hub right ????
Best regards, nErBoS
Yes nErBoS, that's the idea.
'Outside' OP's should be granted the freedom to roam other hubs without having to open extra slots for the hub(s) they themselves are checking.
All other checks should remain normal of course.
makes sense to me =]
Hi,
Try this...
--Requested by Shurlock
--Made by nErBoS
sBot = "Slot Checker"
slotperhub = 1 --Slot that the user Must have per Hub
function Main()
frmHub:RegBot(sBot)
end
function NewUserConnected(user)
local s,e,unreg,reg,op = strfind(user.sMyInfoString, "H:(%x+)/(%x+)/(%x+)")
local s,e,slot = strfind(user.sMyInfoString, "S:(%x+)")
if (unreg ~= nil and reg ~= nil and op ~= nil and tonumber(unreg) ~= nil and tonumber(reg) ~= nil) then
local iHave = tonumber(unreg) + tonumber(reg)
if (slot < iHave*slotperhub) then
user:SendData(sBot, "You are in "..iHave.." Hubs, you must have "..slotperhub.." slots open per Hub.")
user:Disconnect()
end
end
end
Best regards, nErBoS
Thanks for a quick response nErBoS, but....
Am I right in believing that - using the 'and' statement - all 3 sorts of user (Unreg, Reg and OP) must be other than nil before the script will work?
Hi,
Yes. Clients that don't have H:x/x/x on their tag will not be check by the script.
Best regards, nErBoS