Passive User Bot - Assistance Please
 

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

Passive User Bot - Assistance Please

Started by smeg568, 11 December, 2006, 00:14:43

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

smeg568

Hi All

I picked up this bot from here (I think).

Is it possible to set some sort of hubowner switch to allow vips & reg users to bypass the passive check?

I havent got the foggiest about lua - im much too lazy to learn LOL

Please Help    thanks in advance.

Here's the script.......

-- ==================================================
--// PassiveLimiter by GeceBekcisi, 18-10-2005
--// Limits max number of passive users and specifies
--// different share & slot limits for them
--// Rules doesn't apply for operators
-- ==================================================
-- Bot nick to send information with on disconnection
sBotName = frmHub:GetHubBotName()
-- Passive user ratio to all users in %
iPassiveUserRatio = 25
-- Passive user share limit ratio ( X times normal limit specified in hub)
iPassiveShareRatio = 2
-- Passive user slot limit ratio ( X times normal limit specified in hub)
iPassiveSlotRatio = 1.5
-- Passive user counter (DO NOT TOUCH!)
iPassiveUsers = 0
-----------------------------------------------------
function NewUserConnected(curUser)
	if not curUser.bOperator and not curUser.bActive then
		iPassiveUsers = iPassiveUsers + 1
	end
end

function MyINFOArrival(curUser, sData)
	if not curUser.bOperator and not curUser.bActive then
	local iMaxPassiveUsers = tonumber(string.format("%.0f",((frmHub:GetUsersCount()*iPassiveUserRatio)/100)))
		if iPassiveUsers > iMaxPassiveUsers then
				curUser:SendData(sBotName, "Our passive user limit is exceeded and you're not allowed to enter our hub at the moment. Please try later or use active mode. Thanks...")
				curUser:Disconnect()
		else
			if (curUser.iShareSize < frmHub:GetMinShare()*iPassiveShareRatio) then
				curUser:SendData(sBotName, "You share ("..string.format( "%.2f",(curUser.iShareSize/(1024*1024*1024)))..") GiB, but the min share rule for Passive users is ("..string.format( "%.2f",(2*frmHub:GetMinShare()/(1024*1024*1024)))..") GiB for passive users. So you can't enter our hub.")
				curUser:Disconnect()
			end
			if (curUser.iSlots < (frmHub:GetMinSlots()*3)/2) then
				curUser:SendData(sBotName, "You have opened ("..curUser.iSlots..") slots, but the min slots rule for Passive users is ("..tonumber(string.format("%.0f",(frmHub:GetMinSlots()*tonumber(iPassiveSlotRatio))))..") slots for passive users. So you can't enter our hub.")
				curUser:Disconnect()
			end
		end
	end
end

function UserDisconnected(curUser)
	if not curUser.bOperator and not curUser.bActive then
		iPassiveUsers = iPassiveUsers - 1
	end
end
-- ==================================================

smeg568

Me again  ;D

I have found a post titled    PasifBekcisi (PassiveGuardian)

I think it might be a newer version of the script i have, but the link doesnt work    ???

shame

bastya_elvtars

That site is down, and I cannot access the docroot either.
Damn, the script database desperately needs a migration.
Everything could have been anything else and it would have just as much meaning.

SMF spam blocked by CleanTalk