From: <ps...@us...> - 2010-06-16 19:11:13
|
Revision: 2028 http://znc.svn.sourceforge.net/znc/?rev=2028&view=rev Author: psychon Date: 2010-06-16 19:11:07 +0000 (Wed, 16 Jun 2010) Log Message: ----------- Micro optimization Only call GetUser() when we actually need the result Modified Paths: -------------- trunk/Client.cpp Modified: trunk/Client.cpp =================================================================== --- trunk/Client.cpp 2010-06-16 18:48:30 UTC (rev 2027) +++ trunk/Client.cpp 2010-06-16 19:11:07 UTC (rev 2028) @@ -631,11 +631,11 @@ } void CAuthBase::RefuseLogin(const CString& sReason) { - CUser* pUser = CZNC::Get().GetUser(GetUsername()); - if (!m_pSock) return; + CUser* pUser = CZNC::Get().GetUser(GetUsername()); + // If the username is valid, notify that user that someone tried to // login. Use sReason because there are other reasons than "wrong // password" for a login to be rejected (e.g. fail2ban). This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |