User: Have correct save and dl path after Clone()

Without this, after you cloned a user via e.g. the admin modul, it would still
write to the datadir of the old user.

Patch by flakes, thanks a lot.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1686 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2009-12-31 12:28:59 +00:00
parent c97370c7e0
commit 5c28adf4ce

View File

@@ -51,8 +51,6 @@ CUser::CUser(const CString& sUserName) {
m_bIRCConnectEnabled = true;
m_pUserTimer = new CUserTimer(this);
CZNC::Get().GetManager().AddCron(m_pUserTimer);
m_sUserPath = CZNC::Get().GetUserPath() + "/" + sUserName;
m_sDLPath = GetUserPath() + "/downloads";
}
CUser::~CUser() {
@@ -1113,6 +1111,10 @@ CString CUser::MakeCleanUserName(const CString& sUserName) {
void CUser::SetUserName(const CString& s) {
m_sCleanUserName = CUser::MakeCleanUserName(s);
m_sUserName = s;
// set paths that depend on the user name:
m_sUserPath = CZNC::Get().GetUserPath() + "/" + m_sUserName;
m_sDLPath = GetUserPath() + "/downloads";
}
bool CUser::IsChan(const CString& sChan) const {