Applied patches from psychon

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@791 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
prozacx
2007-03-21 16:13:08 +00:00
parent 0a62274975
commit e8c3ebf477
3 changed files with 39 additions and 24 deletions

View File

@@ -574,7 +574,8 @@ void CClient::UserCommand(const CString& sLine) {
}
const map<CString,CNick*>& msNicks = pChan->GetNicks();
const CString& sPerms = m_pUser->GetIRCSock()->GetPerms();
CIRCSock* pIRCSock = (!m_pUser) ? NULL : m_pUser->GetIRCSock();
const CString& sPerms = (pIRCSock) ? pIRCSock->GetPerms() : "";
if (!msNicks.size()) {
PutStatus("No nicks on [" + sChan + "]");
@@ -763,7 +764,8 @@ void CClient::UserCommand(const CString& sLine) {
} else if (sCommand.CaseCmp("LISTCHANS") == 0) {
if (m_pUser) {
const vector<CChan*>& vChans = m_pUser->GetChans();
const CString& sPerms = m_pUser->GetIRCSock()->GetPerms();
CIRCSock* pIRCSock = (!m_pUser) ? NULL : m_pUser->GetIRCSock();
const CString& sPerms = (pIRCSock) ? pIRCSock->GetPerms() : "";
if (!vChans.size()) {
PutStatus("You have no channels defined");