View Single Post
Old 17.08.2005, 13:04   #18
hr
Архивный участник
 
Join Date: Jun 2005
Posts: 285
Default

Untested, just idea.... I hope someone release this and then share

So, subj can be done through stored procedures.
1) Make all reserved accounts builders (for example 9 lvl)
2) Modify some stored procedure, that gets information about acc (for example lin2db.ap_GStat) - add something like following (of course this is not code, just pseudo-sql-code aka idea)

Code:
select @builder_lvl=builder from builder_account where account_id=@account_id

if (@builder_lvl = 0) then
begin
  select @playersonline=count(*) from lin2world.user_data where (login>logout) and (login>0) and (logout>0)
  if (@playersonline > @pl_limit) then
   begin
     set @blockflag2 = 1 //AFAIK this prevent from entering
    //or this: set @paystat = 0
   end

end

else
begin
  set @paystat = 1
end
3) set pl_limit in this code to some value you want, set limit in your configs to some value that higher than your normal user limit
4) online count through DB in most cases contains "ghosts", so we should make some ghost-buster actions (for example add modification to stored procedure, that clears all unowned items @ start or make separate procedure and put it as job before planned restart)
hr is offline