mirror of
https://github.com/znc/znc.git
synced 2026-05-08 22:34:45 +02:00
Add a new module hook OnIRCConnecting
This hook is called just before some user tries to connect() to an IRC server. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1638 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -165,6 +165,13 @@ bool CZNC::ConnectUser(CUser *pUser) {
|
||||
}
|
||||
#endif
|
||||
|
||||
MODULECALL(OnIRCConnecting(pIRCSock), pUser, NULL,
|
||||
DEBUG("Some module aborted the connection attempt");
|
||||
ReleaseISpoof();
|
||||
delete pIRCSock;
|
||||
return false;
|
||||
);
|
||||
|
||||
if (!m_Manager.Connect(pServer->GetName(), pServer->GetPort(), sSockName, 120, bSSL, pUser->GetVHost(), pIRCSock)) {
|
||||
ReleaseISpoof();
|
||||
pUser->PutStatus("Unable to connect. (Bad host?)");
|
||||
|
||||
Reference in New Issue
Block a user