Hi!!!
 

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

Hi!!!

Started by enema, 13 October, 2004, 20:40:21

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

enema

This is what I came  up with in some time of silence - script that changes min share, slots and maxhubs acording to time. For example - if clock is 9.00 in the morning, min share is set to 1 GB, if clock is 9.00 in evening, min share is set to 3 GB, etc... can somebody make something like this? I tried myself, but Im too dumb...

bastya_elvtars

Great idea!!!

Does this have to be independent of ptokax inbuilt minshare?
Everything could have been anything else and it would have just as much meaning.

enema

I dont care, if its inbuild or not... It would be awesome, if bot would give a warning to users in main, that after certain time (for example - 1 h) min share will be changed.

(uk-kingdom)John

This sounds a great idea, hope its possible.. :D

Shurlock

Good plan!

But...... do you also wish to disconnect users that have entered the hub within the 'minimum share' time-limit that are still online during the 'maximum share' time-limit?

If so, I believe you will be working on getting users 'onboard' that are actually beyond your local time.

Conclusion:
- between YOUR local 'night' hours you will allow users with less share to enter because they are in a different timezone
- between YOUR local 'day' hours you will not accept users that happen to live in your 'timezone'

The idea sounds great, but.... we should not forget that Internet HAS no time bounderies.

Greets!
If it's raining and your roof leaks, fix the roof. DON'T try to stop the rain!!

enema

hmm, there should be somekind of switch like

Keep online users with low share = 1 --- Type 0 if disconnect

and so on with slots, max hubs and other stuff. Of course there are many users in my hub from different countries, but most of users are from my country or at least europe. So I dont care about timezones. Of course, if you can build in auto who-is detection and show each users local timezone, this script would be a blast.... but can someone make something like this???

I hope you can!!!

enema

Is this one really too hard for you all? Or its impossible to make this one?

nErBoS

Hi,

It's not hard but be patience, someone will help you, this weekend i can only answer to small request but in the next week i don't mind on helping you making this script (if you don't get helped until then).

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

enema

I've done it myself... Right now it only changes min share 2 times a day, but acctually, it is all that I wanted :) If you want something more, upgrading is up to you!!!

--Automatic min share changer (min share is changed acording to time)
--Made by enema with BIG thanks to plop and WooshMan
--date - 30.10.2004
---------------------------------------------------------------------------------------------------------------------
-- This will help you get through
-- a and c is number of units you want to change for first and second time in day. You can change them as you like
-- b and d is for units (0 = b, 1 = kb, 2 = mb, 3 = gb)
---------------------------------------------------------------------------------------------------------------------
-- EDITABLE PART ----------------------------------------------------------------------------------------------------

a = "10"	-- Number of units when min share should change first time
b = "2"		-- unit
c = "15"	-- Number of units when min share should change secon time
d = "3"		-- unit

current = date("%H:%M")
iMin = 1000*60 
tTime1 = {
	--["timestring"] = "show this string"
	["17:54"] = "Min share is set to "..a.." MB!"
}								--- editable time 1, Update those units too!!
	
tTime2 = {
	--["timestring"] = "show this string"
	["17:53"] = "Min share is set to "..c.." GB!!"
} 								--- editable time 2, Update those units too!!

--END OF THE EDITABLE PART-------------------------------------------------------------------------------------------
function Main() 
	current = date("%H:%M")
	frmHub:RegBot("---" ..current .."---")
	SetTimer(iMin) 
	StartTimer() 
end 

function OnTimer()
	frmHub:UnregBot("---" ..current .."---")
	current = date("%H:%M")
	if tTime1[current] then
		frmHub:SetMinShare(a, b)
		SendToAll( ("---" ..current .."---"), tTime1[current] )
	elseif tTime2[current] then
		frmHub:SetMinShare(c, d)
		SendToAll( ("---" ..current .."---"), tTime2[current] )
	end
	frmHub:RegBot("---" ..current .."---")
end

function OnExit()
frmHub:UnregBot("---" ..current .."---")
end

SMF spam blocked by CleanTalk