Merge branch 'master' of github.com:znc/znc

This commit is contained in:
Alexey Sokolov
2012-07-28 02:58:21 +07:00
3 changed files with 11 additions and 3 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ public:
bool PutModule(const CString& sModule, const CString& sLine, CClient* pClient = NULL, CClient* pSkipClient = NULL);
const std::vector<CChan*>& GetChans() const;
CChan* FindChan(const CString& sName) const;
CChan* FindChan(CString sName) const;
bool AddChan(CChan* pChan);
bool AddChan(const CString& sName, bool bInConfig);
bool DelChan(const CString& sName);
+5 -1
View File
@@ -606,7 +606,11 @@ bool CIRCNetwork::PutModule(const CString& sModule, const CString& sLine, CClien
const vector<CChan*>& CIRCNetwork::GetChans() const { return m_vChans; }
CChan* CIRCNetwork::FindChan(const CString& sName) const {
CChan* CIRCNetwork::FindChan(CString sName) const {
if (GetIRCSock()) {
sName.TrimLeft(GetIRCSock()->GetPerms());
}
for (unsigned int a = 0; a < m_vChans.size(); a++) {
CChan* pChan = m_vChans[a];
if (sName.Equals(pChan->GetName())) {
+5 -1
View File
@@ -233,7 +233,7 @@ bool CModule::ClearNV(bool bWriteToDisk) {
}
bool CModule::AddTimer(CTimer* pTimer) {
if ((!pTimer) || (FindTimer(pTimer->GetName()))) {
if ((!pTimer) || (!pTimer->GetName().empty() && FindTimer(pTimer->GetName()))) {
delete pTimer;
return false;
}
@@ -280,6 +280,10 @@ bool CModule::UnlinkTimer(CTimer* pTimer) {
}
CTimer* CModule::FindTimer(const CString& sLabel) {
if (sLabel.empty()) {
return NULL;
}
set<CTimer*>::iterator it;
for (it = m_sTimers.begin(); it != m_sTimers.end(); ++it) {
CTimer* pTimer = *it;