[0014] Updated realmd to use account_access. This allows for different security levels per account for each realm in realmlist.

This commit is contained in:
Surion 2012-08-07 19:34:25 -05:00 committed by Antz
parent cca3dfd883
commit 1597b90686
11 changed files with 97 additions and 30 deletions

View file

@ -390,7 +390,7 @@ bool AuthSocket::_HandleLogonChallenge()
///- Get the account details from the account table
// No SQL injection (escaped user name)
result = LoginDatabase.PQuery("SELECT sha_pass_hash,id,locked,last_ip,gmlevel,v,s FROM account WHERE username = '%s'", _safelogin.c_str());
result = LoginDatabase.PQuery("SELECT a.sha_pass_hash,a.id,a.locked,a.last_ip,aa.gmlevel,a.v,a.s FROM account a LEFT JOIN account_access aa ON (a.id = aa.id) WHERE username = '%s'", _safelogin.c_str());
if (result)
{
///- If the IP is 'locked', check that the player comes indeed from the correct IP address