mirror of
https://github.com/znc/znc.git
synced 2026-05-04 20:42:33 +02:00
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:
6
User.cpp
6
User.cpp
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user