diff --git a/Chan.cpp b/Chan.cpp index f14d85d6..711e7122 100644 --- a/Chan.cpp +++ b/Chan.cpp @@ -275,6 +275,24 @@ void CChan::ModeChange(const CString& sModes, const CString& sOpNick) { } } +CString CChan::GetOptions() const { + CString sRet; + + if (IsDetached()) { + sRet += (sRet.empty()) ? "Detached" : ", Detached"; + } + + if (AutoCycle()) { + sRet += (sRet.empty()) ? "AutoCycle" : ", AutoCycle"; + } + + if (KeepBuffer()) { + sRet += (sRet.empty()) ? "KeepBuffer" : ", KeepBuffer"; + } + + return sRet; +} + CString CChan::GetModeArg(unsigned char uMode) const { if (uMode) { map::const_iterator it = m_musModes.find(uMode); diff --git a/Chan.h b/Chan.h index 2cff6177..18559d45 100644 --- a/Chan.h +++ b/Chan.h @@ -109,6 +109,7 @@ public: // Getters bool HasMode(unsigned char uMode) const; + CString GetOptions() const; CString GetModeArg(unsigned char uMode) const; unsigned int GetPermCount(unsigned char uPerm); const bool IsOn() const { return m_bIsOn; }