From 6cd46ebd4ac720ac174f87db83ebee95e9035441 Mon Sep 17 00:00:00 2001 From: p0wer Date: Tue, 22 Dec 2009 21:09:04 -0600 Subject: * 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 --- src/trinitycore/RASocket.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/trinitycore/RASocket.cpp') 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()