Jump to content

GM Ticket System ~ Email Retireval?


Recommended Posts

Posted

try this

diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp
index ca2cc96..c349554 100644
--- a/src/game/Level2.cpp
+++ b/src/game/Level2.cpp
@@ -2160,8 +2160,9 @@ bool ChatHandler::HandlePInfoCommand(const char* args)
    std::string last_ip = GetMangosString(LANG_ERROR);
    uint32 security = 0;
    std::string last_login = GetMangosString(LANG_ERROR);
+    std::string email = GetMangosString(LANG_ERROR);

-    QueryResult* result = loginDatabase.PQuery("SELECT username,gmlevel,last_ip,last_login FROM account WHERE id = '%u'",accId);
+    QueryResult* result = loginDatabase.PQuery("SELECT username,gmlevel,last_ip,last_login,email FROM account WHERE id = '%u'",accId);
    if(result)
    {
        Field* fields = result->Fetch();
@@ -2178,13 +2179,15 @@ bool ChatHandler::HandlePInfoCommand(const char* args)
            last_ip = "-";
            last_login = "-";
        }
+        
+        email = fields[4].GetCppString();

        delete result;
    }

    std::string nameLink = playerLink(target_name);

-    PSendSysMessage(LANG_PINFO_ACCOUNT, (target?"":GetMangosString(LANG_OFFLINE)), nameLink.c_str(), GUID_LOPART(target_guid), username.c_str(), accId, security, last_ip.c_str(), last_login.c_str(), latency);
+    PSendSysMessage(LANG_PINFO_ACCOUNT, (target?"":GetMangosString(LANG_OFFLINE)), nameLink.c_str(), GUID_LOPART(target_guid), username.c_str(), accId, email.c_str(), security, last_ip.c_str(), last_login.c_str(), latency);

    std::string timeStr = secsToTimeString(total_player_time,true,true);
    uint32 gold = money /GOLD;

sql:

delete from `mangos_string` where `entry` = '548';
insert into `mangos_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`) values('548','Player%s %s (guid: %u) Account: %s (id: %u) E-mail: %s GMLevel: %u Last IP: %s Last login: %s Latency: %ums',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);

  • 4 weeks later...
Posted
try this

diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp
index ca2cc96..c349554 100644
--- a/src/game/Level2.cpp
+++ b/src/game/Level2.cpp
@@ -2160,8 +2160,9 @@ bool ChatHandler::HandlePInfoCommand(const char* args)
    std::string last_ip = GetMangosString(LANG_ERROR);
    uint32 security = 0;
    std::string last_login = GetMangosString(LANG_ERROR);
+    std::string email = GetMangosString(LANG_ERROR);

-    QueryResult* result = loginDatabase.PQuery("SELECT username,gmlevel,last_ip,last_login FROM account WHERE id = '%u'",accId);
+    QueryResult* result = loginDatabase.PQuery("SELECT username,gmlevel,last_ip,last_login,email FROM account WHERE id = '%u'",accId);
    if(result)
    {
        Field* fields = result->Fetch();
@@ -2178,13 +2179,15 @@ bool ChatHandler::HandlePInfoCommand(const char* args)
            last_ip = "-";
            last_login = "-";
        }
+        
+        email = fields[4].GetCppString();

        delete result;
    }

    std::string nameLink = playerLink(target_name);

-    PSendSysMessage(LANG_PINFO_ACCOUNT, (target?"":GetMangosString(LANG_OFFLINE)), nameLink.c_str(), GUID_LOPART(target_guid), username.c_str(), accId, security, last_ip.c_str(), last_login.c_str(), latency);
+    PSendSysMessage(LANG_PINFO_ACCOUNT, (target?"":GetMangosString(LANG_OFFLINE)), nameLink.c_str(), GUID_LOPART(target_guid), username.c_str(), accId, email.c_str(), security, last_ip.c_str(), last_login.c_str(), latency);

    std::string timeStr = secsToTimeString(total_player_time,true,true);
    uint32 gold = money /GOLD;

sql:

delete from `mangos_string` where `entry` = '548';
insert into `mangos_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`) values('548','Player%s %s (guid: %u) Account: %s (id: %u) E-mail: %s GMLevel: %u Last IP: %s Last login: %s Latency: %ums',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);

Where would we implement that in? (I get the SQL part.)

/noob (sorry Q_Q )

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use