mirror of
https://github.com/znc/znc.git
synced 2026-07-06 18:01:21 +02:00
Fix a crash with OnClientLogin()
A client doesn't necessarily have a network after logging in (e.g. could have used an invalid network name). This is another crash found by exoa, thanks. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
+5
-1
@@ -666,7 +666,11 @@ void CClient::AcceptLogin(CUser& User) {
|
||||
|
||||
SendMotd();
|
||||
|
||||
NETWORKMODULECALL(OnClientLogin(), m_pUser, m_pNetwork, this, NOTHING);
|
||||
if (m_pNetwork) {
|
||||
NETWORKMODULECALL(OnClientLogin(), m_pUser, m_pNetwork, this, NOTHING);
|
||||
} else {
|
||||
USERMODULECALL(OnClientLogin(), m_pUser, this, NOTHING);
|
||||
}
|
||||
}
|
||||
|
||||
void CClient::Timeout() {
|
||||
|
||||
Reference in New Issue
Block a user