PtokaX forum

Archive => Archived 5.0 boards => Finished Scripts => Topic started by: plop on 27 February, 2005, 22:15:39

Title: set max logins
Post by: plop on 27 February, 2005, 22:15:39
script 2 change the maximum concurrent logins from ptokax.
iMaxLogins = frmHub:GetMaxLogins()
iLevelHubOwner = 0

function ChatArrival(user, data)
   if user.iProfile == iLevelHubOwner then
local s,e,sCom, iVal = string.find(data, "%b<>%s+(%S+)%s*(%S*).*|")
if sCom then
  if sCom == "!setmaxlogin" then
if iVal == "" then
  iVal = iMaxLogins
else
  iVal = tonumber(iVal)
end
frmHub:SetMaxLogins(iVal)
user:SendData(frmHub:GetHubBot(), "Max Logins changed to: "..iVal)
return 1
  elseif sCom == "!getmaxlogin" then
user:SendData(frmHub:GetHubBot(), "Max Logins is set to: "..frmHub:GetMaxLogins())
return 1
  end
end
   end
end

plop
Title: Re: set max logins
Post by: -SkA- on 25 March, 2006, 16:02:00
I have a big hub and when I make a reset, users have problems rejoining hub due to max logins set to 500.

Is it possible to increase this max value?
Title: Re: set max logins
Post by: plop on 26 March, 2006, 18:16:24
Quote from: -SkA- on 25 March, 2006, 16:02:00
I have a big hub and when I make a reset, users have problems rejoining hub due to max logins set to 500.

Is it possible to increase this max value?

thats what the above script is made for.
it doesn't limit the maximum users in the hub, it limits the maximum amount of user able 2 login at the same moment.

plop
Title: Re: set max logins
Post by: -SkA- on 26 March, 2006, 18:31:00
Probably you don't understand what I said:

The problem is not max users, but max login. With the script above, I can set a maximum logins of 500 user at the same moment that is a too low value. Imagine 6000 users rejoining the hub at same moment and limit is set @ 500...
Title: Re: set max logins
Post by: -SkA- on 26 March, 2006, 19:22:09
The problem is that when there is hub restart, users stay in queue for about 50 minutes.

Title: Re: set max logins
Post by: PPK on 26 March, 2006, 21:55:59
Max logins is outdated thing originaly created by ptaczek. In 0.3.3.0 b15.25 it limit connections accepted by server thread waiting for processing by main thread... but this is exploitable and create "hub is unable to process your login..." thing and not fix main problem with taking max upload badwith by more users loading userlist (and causing with this dropping other users with "connection reset"). I use this value to create lower value for limiting users to send userlist, but i always don't know what value is best  ::)
Title: Re: set max logins
Post by: plop on 29 March, 2006, 01:07:26
Quote from: -SkA- on 26 March, 2006, 18:31:00
Probably you don't understand what I said:

The problem is not max users, but max login. With the script above, I can set a maximum logins of 500 user at the same moment that is a too low value. Imagine 6000 users rejoining the hub at same moment and limit is set @ 500...

i ment the same as you think/wanted, just i now see that this has a max of 500.

plop