mirror of
https://github.com/znc/znc.git
synced 2026-05-09 14:54:53 +02:00
OnClientDisconnect() always needs a valid user
If a client disconnected before completing the authentication, OnClientDisconnect() was called with m_pUser == NULL. This problem is new since previously MODULECALL silently failed if it got a NULL. Thanks to ex0a for repeatedly crashing his znc to figure this out. :-P Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
+3
-1
@@ -685,7 +685,9 @@ void CClient::Disconnected() {
|
||||
DEBUG(GetSockName() << " == Disconnected()");
|
||||
SetNetwork(NULL, true, false);
|
||||
|
||||
MODULECALL(OnClientDisconnect(), m_pUser, m_pNetwork, this, NOTHING);
|
||||
if (m_pUser) {
|
||||
MODULECALL(OnClientDisconnect(), m_pUser, m_pNetwork, this, NOTHING);
|
||||
}
|
||||
}
|
||||
|
||||
void CClient::ReachedMaxBuffer() {
|
||||
|
||||
Reference in New Issue
Block a user