How to limit users during testing phase
-
- Posts: 129
- Joined: Wed May 27, 2015 4:23 pm
How to limit users during testing phase
I have a server that I would like to take public soon but as it is users can freely create accounts. I would like to see if there was a method to limit the amount of users during the testing period. The only workaround I have come up with is having people register on the server forum and once they are approved they get the IP info.
Re: How to limit users during testing phase
if you want to limit accounts created, you can modify the query in DSConnect that checks if an account exists, and have it also make sure there's less than however many accounts. if you're looking to limit peopled logged in, you can have it check the number of records in accounts_sessions before inserting into accounts_sessions (also in DSConnect)
-
- Posts: 129
- Joined: Wed May 27, 2015 4:23 pm
Re: How to limit users during testing phase
Hate to ask but do you know roughly around which line its located?
Re: How to limit users during testing phase
not without looking myself, but you could just do a project wide search on "FROM accounts" for the first and "INTO accounts_sessions" for the other one
Re: How to limit users during testing phase
The lobby server isn't that big, it shouldn't be hard to find
-- Whasf
-
- Posts: 129
- Joined: Wed May 27, 2015 4:23 pm
Re: How to limit users during testing phase
Yeah took me a while to get the right syntax but I got it working in lobby.cppwhasf wrote:The lobby server isn't that big, it shouldn't be hard to find
Code: Select all
const int8 acclimit = (Sql_Query(SqlHandle, "SELECT COUNT(*) FROM accounts_sessions"));
if (acclimit < 26)
{
fmtQuery = "INSERT INTO accounts_sessions(accid,charid,session_key,server_addr,server_port,client_addr) VALUES(%u,%u,x'%s',%u,%u,%u)";
}
else
{
ShowError(CL_RED"recv_parse: Maximum Logins reached (25)\n" CL_RESET);
}