Added GetOptions()

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@497 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
prozacx
2005-09-15 04:15:56 +00:00
parent dfbb2db170
commit 7e7e85a22f
2 changed files with 19 additions and 0 deletions
+18
View File
@@ -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<unsigned char, CString>::const_iterator it = m_musModes.find(uMode);
+1
View File
@@ -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; }