From 9db39b5eec80ab4b89c3b73471c21118b98ca3b6 Mon Sep 17 00:00:00 2001 From: SecretsOTheP Date: Mon, 8 Dec 2014 05:46:10 -0500 Subject: [PATCH] Added a feature that allows an EQ client to log in directly to World without having to enter the LoginServer, provided the 'password' field is set in WorldServer. Mainly used for administration purposes. A DLL hack is needed to utilize this feature, and the DLL itself will be posted (source included) on the EQEmulator forums. It uses Microsoft Detours 1.5. Up to you guys if you want to add the source to this program here. --- changelog.txt | 3 +++ world/client.cpp | 7 ++++++- world/clientlist.cpp | 6 ++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/changelog.txt b/changelog.txt index e24dcd59d..25e6f2e54 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,8 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 12/08/2014 == +Secrets: Added a feature that allows an EQ client to log in directly to World without having to enter the LoginServer, provided the 'password' field is set in WorldServer. + == 12/04/2014 == Kayen: Ranged attacks will now more accurately check MAX firing range, fixing the issue where you would hit ranged attack and nothing would happpen due to incorrect server side range checks. diff --git a/world/client.cpp b/world/client.cpp index e37015e19..decb98f9a 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -397,6 +397,11 @@ bool Client::HandleSendLoginInfoPacket(const EQApplicationPacket *app) { } else if(strncasecmp(name, "LS#", 3) == 0) id=atoi(&name[3]); + else if(database.GetAccountIDByName(name)){ + int16 status = 0; + uint32 lsid = 0; + id = database.GetAccountIDByName(name, &status, &lsid); + } else id=atoi(name); #ifdef IPBASED_AUTH_HACK @@ -406,7 +411,7 @@ bool Client::HandleSendLoginInfoPacket(const EQApplicationPacket *app) { clog(WORLD__CLIENT_ERR,"Error: Login server login while not connected to login server."); return false; } - if ((minilogin && (cle = client_list.CheckAuth(id,password,ip))) || (cle = client_list.CheckAuth(id, password))) + if (((cle = client_list.CheckAuth(name, password)) || (cle = client_list.CheckAuth(id, password)))) #endif { if (cle->AccountID() == 0 || (!minilogin && cle->LSID()==0)) { diff --git a/world/clientlist.cpp b/world/clientlist.cpp index 6de17d176..c33822d93 100644 --- a/world/clientlist.cpp +++ b/world/clientlist.cpp @@ -424,11 +424,13 @@ ClientListEntry* ClientList::CheckAuth(const char* iName, const char* iPassword) } int16 tmpadmin; - _log(WORLD__ZONELIST,"Login with '%s' and '%s'", iName, iPassword); + //_log(WORLD__ZONELIST,"Login with '%s' and '%s'", iName, iPassword); uint32 accid = database.CheckLogin(iName, iPassword, &tmpadmin); if (accid) { - ClientListEntry* tmp = new ClientListEntry(GetNextCLEID(), accid, iName, tmpMD5, tmpadmin); + uint32 lsid = 0; + database.GetAccountIDByName(iName, &tmpadmin, &lsid); + ClientListEntry* tmp = new ClientListEntry(GetNextCLEID(), lsid, iName, tmpMD5, tmpadmin, 0, 0); clientlist.Append(tmp); return tmp; }