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
so this one takes less bandwidth?
(sorry for asking a stupid question :P)
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?
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