Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
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  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 16:42.