Consider OP's in slot check
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Consider OP's in slot check

Started by Shurlock, 06 June, 2004, 04:56:53

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Shurlock

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!!)
If it's raining and your roof leaks, fix the roof. DON'T try to stop the rain!!

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
--## nErBoS Spot ##--

bastya_elvtars

I am interested in this too...
Everything could have been anything else and it would have just as much meaning.

Shurlock

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.
If it's raining and your roof leaks, fix the roof. DON'T try to stop the rain!!

Corayzon

makes sense to me =]

nErBoS

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
--## nErBoS Spot ##--

Shurlock

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?
If it's raining and your roof leaks, fix the roof. DON'T try to stop the rain!!

nErBoS

Hi,

Yes. Clients that don't have H:x/x/x on their tag will not be check by the script.

Best regards, nErBoS
--## nErBoS Spot ##--

SMF spam blocked by CleanTalk