mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-09 08:17:56 +00:00
feat(Core/Hooks): OnLastIpUpdate(accountId, ip) (#4913)
This commit is contained in:
@@ -1761,6 +1761,11 @@ void ScriptMgr::OnAccountLogin(uint32 accountId)
|
|||||||
FOREACH_SCRIPT(AccountScript)->OnAccountLogin(accountId);
|
FOREACH_SCRIPT(AccountScript)->OnAccountLogin(accountId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ScriptMgr::OnLastIpUpdate(uint32 accountId, std::string ip)
|
||||||
|
{
|
||||||
|
FOREACH_SCRIPT(AccountScript)->OnLastIpUpdate(accountId, ip);
|
||||||
|
}
|
||||||
|
|
||||||
void ScriptMgr::OnFailedAccountLogin(uint32 accountId)
|
void ScriptMgr::OnFailedAccountLogin(uint32 accountId)
|
||||||
{
|
{
|
||||||
FOREACH_SCRIPT(AccountScript)->OnFailedAccountLogin(accountId);
|
FOREACH_SCRIPT(AccountScript)->OnFailedAccountLogin(accountId);
|
||||||
|
|||||||
@@ -967,6 +967,9 @@ public:
|
|||||||
// Called when an account logged in successfully
|
// Called when an account logged in successfully
|
||||||
virtual void OnAccountLogin(uint32 /*accountId*/) { }
|
virtual void OnAccountLogin(uint32 /*accountId*/) { }
|
||||||
|
|
||||||
|
// Called when an ip logged in successfully
|
||||||
|
virtual void OnLastIpUpdate(uint32 /*accountId*/, std::string /*ip*/) { }
|
||||||
|
|
||||||
// Called when an account login failed
|
// Called when an account login failed
|
||||||
virtual void OnFailedAccountLogin(uint32 /*accountId*/) { }
|
virtual void OnFailedAccountLogin(uint32 /*accountId*/) { }
|
||||||
|
|
||||||
@@ -1412,6 +1415,7 @@ public: /* PlayerScript */
|
|||||||
|
|
||||||
public: /* AccountScript */
|
public: /* AccountScript */
|
||||||
void OnAccountLogin(uint32 accountId);
|
void OnAccountLogin(uint32 accountId);
|
||||||
|
void OnLastIpUpdate(uint32 accountId, std::string ip);
|
||||||
void OnFailedAccountLogin(uint32 accountId);
|
void OnFailedAccountLogin(uint32 accountId);
|
||||||
void OnEmailChange(uint32 accountId);
|
void OnEmailChange(uint32 accountId);
|
||||||
void OnFailedEmailChange(uint32 accountId);
|
void OnFailedEmailChange(uint32 accountId);
|
||||||
|
|||||||
@@ -979,6 +979,8 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
|||||||
|
|
||||||
LoginDatabase.Execute(stmt);
|
LoginDatabase.Execute(stmt);
|
||||||
|
|
||||||
|
sScriptMgr->OnLastIpUpdate(id, address);
|
||||||
|
|
||||||
// NOTE ATM the socket is single-threaded, have this in mind ...
|
// NOTE ATM the socket is single-threaded, have this in mind ...
|
||||||
ACE_NEW_RETURN(m_Session, WorldSession(id, this, AccountTypes(security), expansion, mutetime, locale, recruiter, isRecruiter, skipQueue, TotalTime), -1);
|
ACE_NEW_RETURN(m_Session, WorldSession(id, this, AccountTypes(security), expansion, mutetime, locale, recruiter, isRecruiter, skipQueue, TotalTime), -1);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user