diff options
author | p0wer <none@none> | 2009-12-22 21:09:04 -0600 |
---|---|---|
committer | p0wer <none@none> | 2009-12-22 21:09:04 -0600 |
commit | 6cd46ebd4ac720ac174f87db83ebee95e9035441 (patch) | |
tree | cdb202cb5ab81d0f91bf1b864e7eec92ccccda2c /src/trinitycore/RASocket.cpp | |
parent | f305c4639e437a98a891bf72f8d9b6140f14a721 (diff) |
* Add more checks for the gmlevel patch in RAsocket.cpp
* Allow only GM's with the gmlevel across all realms access to RA.
* Thanks to Sundark.
--HG--
branch : trunk
Diffstat (limited to 'src/trinitycore/RASocket.cpp')
-rw-r--r-- | src/trinitycore/RASocket.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/trinitycore/RASocket.cpp b/src/trinitycore/RASocket.cpp index ad8b748a687..055cfebada6 100644 --- a/src/trinitycore/RASocket.cpp +++ b/src/trinitycore/RASocket.cpp @@ -154,7 +154,7 @@ void RASocket::OnRead() ///- Escape the Login to allow quotes in names loginDatabase.escape_string(login); - QueryResult* result = loginDatabase.PQuery("SELECT aa.gmlevel FROM account a LEFT JOIN account_access aa ON (a.id = aa.id) WHERE a.username = '%s'",login.c_str ()); + QueryResult* result = loginDatabase.PQuery("SELECT a.id, aa.gmlevel FROM account a LEFT JOIN account_access aa ON (a.id = aa.id) WHERE a.username = '%s' AND aa.RealmID = '-1'",login.c_str ()); ///- If the user is not found, deny access if(!result) @@ -170,7 +170,7 @@ void RASocket::OnRead() //szPass=fields[0].GetString(); ///- if gmlevel is too low, deny access - if(fields[0].GetUInt32()<iMinLevel) + if(fields[1].GetUInt32()<iMinLevel && fields[1].GetUInt32() != NULL)) { Sendf("-Not enough privileges.\r\n"); sLog.outRemote("User %s has no privilege.\n",szLogin.c_str()); |