From 75904791863494b213c5b8ae2a864910a5d4ca35 Mon Sep 17 00:00:00 2001 From: p0wer Date: Mon, 21 Dec 2009 21:08:29 -0600 Subject: * Add support for different gmlevel's for different realms. * * Using the value -1 will add the same value for all realms. * Make sure to apply the updates. * Information regarding this patch will be posted on the database forums soon. * * Thanks to Sundark and the Ilixiuemu team(for original patch) --HG-- branch : trunk --- src/trinityrealm/AuthSocket.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/trinityrealm/AuthSocket.cpp') diff --git a/src/trinityrealm/AuthSocket.cpp b/src/trinityrealm/AuthSocket.cpp index a19d16106f3..ee71c523816 100644 --- a/src/trinityrealm/AuthSocket.cpp +++ b/src/trinityrealm/AuthSocket.cpp @@ -410,7 +410,12 @@ 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 a.username = '%s'",_safelogin.c_str ()); if (result) { ///- If the IP is 'locked', check that the player comes indeed from the correct IP address -- cgit v1.2.3