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
This commit is contained in:
prozacx
2006-09-13 02:49:56 +00:00
parent dc2925febc
commit 0448e24ce3
+2 -2
View File
@@ -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;