can this one take...
 

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

can this one take...

Started by blackwings, 24 October, 2004, 02:05:26

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

blackwings

Is it possible to make so that this script takes less bandwith? Right now it takes like 300kb/s every 12 seconds
(my setting is on every 12 seconds) in my hub with 90-100 users. And it even take this much after I modded
it so it only sends tag to non-regged users. Like if you only send the tag to the description when user start or
that the script put the names of the non-regged users that connect to a table and every time it's going to send the tag,
it checks the table and if you user isn't in there, then the script sends the tag
--Description Tag by ??????Hawk?????? 05-07-2004
--Great Idea Hawk ...thx
--Modded by Mutor
--Adjust for your profile names if needed
--
--User Settings-------------------------------------------------------------------------------------
--
UnRegTagInDescription = "Not Regged"		--Sets the tag to be shown in Unreg's descriptions
Mins =  "1"				--Sets the time for the tags to be updated

--End User Settings----------------------------------------------------------------------------------
UnReg = {}

function Main() 
	SetTimer(12000) 
	StartTimer()
end 

function NewUserConnected(user, data)
	if (user.iProfile == -1 and UnReg[user.sName] == nil) then
		UnReg[user.sName] = 1
	end
end

function UserDisconnected(user, data)
	if (user.iProfile == -1 and UnReg[user.sName] ~= nil) then
		UnReg[user.sName] = nil
	end
end

function OnTimer()
	SetUnRegTag("UnReg")
end

function SetUnRegTag(User)
	local aux,usr
	for usr, aux in UnReg do
		if (GetItemByName(usr) ~= nil) then
		local profname = "[ "..UnRegTagInDescription.." ] :"
		local userToShow = GetItemByName(usr)
			if (userToShow.sMyInfoString ~= nil) then
				local s,e,name,desc,speed,email,share = strfind(userToShow.sMyInfoString, "$MyINFO $ALL (%S+)%s+([^$]*)$ $([^$]*)$([^$]*)$([^$]+)")
				SendToAll( "$MyINFO $ALL "..name.." "..profname.." "..desc.."$ $"..speed.."$"..email.."$"..share.."$")
			end
		end
	end
end


blackwings

so this one takes less bandwidth?
(sorry for asking a stupid question :P)


blackwings

#2
Hmm, your script sends update on the tag  now and then to users, is that because it's needed? If it is, why don't do this=
Your script runs on a timer right, so why don't have 2 timers? Like one that says how long time it should wait
to send the tag to the non-regged user when he/she connect and the other timer is for how often script sends
a update on the tag. Like the first timmer is on 1 second and the other one on 60 seconds.
Whouldn't this maybe save allot of bandwidth?


plop

aslong as the nicklist can't be blocked this will always be increasing the b/w usage.
the current ptokax beta i have reduces the b/w by stripping the myinfo's but still the nicklist can't be blocked.
i asked PPK 2 check verlihub for idea's 2 strip it even more.
but sending altered myinfo's like this script does would still mean the b/w is gone be increased and so be a bad idea 2 use.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

SMF spam blocked by CleanTalk