client auth: Switch from CSmartPtr to std::shared_ptr

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter
2014-09-12 15:12:46 +02:00
parent 3953185b04
commit 7704bc49d7
13 changed files with 22 additions and 23 deletions
+6 -6
View File
@@ -22,7 +22,7 @@ class CIMAPAuthMod;
class CIMAPSock : public CSocket {
public:
CIMAPSock(CIMAPAuthMod* pModule, CSmartPtr<CAuthBase> Auth)
CIMAPSock(CIMAPAuthMod* pModule, std::shared_ptr<CAuthBase> Auth)
: CSocket((CModule*) pModule), m_spAuth(Auth) {
m_pIMAPMod = pModule;
m_bSentReply = false;
@@ -39,10 +39,10 @@ public:
virtual void ReadLine(const CString& sLine);
private:
protected:
CIMAPAuthMod* m_pIMAPMod;
bool m_bSentLogin;
bool m_bSentReply;
CSmartPtr<CAuthBase> m_spAuth;
CIMAPAuthMod* m_pIMAPMod;
bool m_bSentLogin;
bool m_bSentReply;
std::shared_ptr<CAuthBase> m_spAuth;
};
@@ -84,7 +84,7 @@ public:
return true;
}
virtual EModRet OnLoginAttempt(CSmartPtr<CAuthBase> Auth) {
virtual EModRet OnLoginAttempt(std::shared_ptr<CAuthBase> Auth) {
CUser* pUser = CZNC::Get().FindUser(Auth->GetUsername());
if (!pUser) { // @todo Will want to do some sort of && !m_bAllowCreate in the future