From 0448e24ce38f42435a35d4280ed23d59ef97c260 Mon Sep 17 00:00:00 2001 From: prozacx Date: Wed, 13 Sep 2006 02:49:56 +0000 Subject: [PATCH] Use IsChan() function instead of hard coding # and & git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@749 726aef4b-f618-498e-8847-2d620e286838 --- Chan.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Chan.cpp b/Chan.cpp index 68cf0e2e..46a5a8e8 100644 --- a/Chan.cpp +++ b/Chan.cpp @@ -7,13 +7,13 @@ CChan::CChan(const CString& sName, CUser* pUser, bool bInConfig) { m_sName = sName.Token(0); m_sKey = sName.Token(1); + m_pUser = pUser; - if (m_sName.Left(1) != "#" && m_sName.Left(1) != "&") { + if (!m_pUser->IsChan(m_sName)) { m_sName = "#" + m_sName; } m_bInConfig = bInConfig; - m_pUser = pUser; m_Nick.SetUser(pUser); m_bAutoCycle = m_pUser->AutoCycle(); m_bDetached = false;