mirror of
https://github.com/znc/znc.git
synced 2026-08-02 23:12:46 +02:00
Committing patches from crox/psychon
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@790 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -117,11 +117,17 @@ void CNick::UpdatePermChar() {
|
||||
const set<unsigned char>& CNick::GetChanPerms() const { return m_suChanPerms; }
|
||||
const unsigned char CNick::GetPermChar() const { return m_cPerm; }
|
||||
CString CNick::GetPermStr() const {
|
||||
CIRCSock* pIRCSock = (!m_pUser) ? NULL : m_pUser->GetIRCSock();
|
||||
const CString& sChanPerms = (!pIRCSock) ? "@+" : pIRCSock->GetPerms();
|
||||
CString sRet;
|
||||
|
||||
if (m_cPerm) {
|
||||
sRet += m_cPerm;
|
||||
}
|
||||
for (unsigned int a = 0; a < sChanPerms.size(); a++) {
|
||||
const unsigned char& c = sChanPerms[a];
|
||||
|
||||
if (HasPerm(c)) {
|
||||
sRet += c;
|
||||
}
|
||||
}
|
||||
|
||||
return sRet;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user