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:
psychon
2009-09-26 14:49:15 +00:00
parent 6cdc7fb527
commit 5ccbd002c0
3 changed files with 12 additions and 0 deletions
+7
View File
@@ -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?)");