mirror of
https://github.com/znc/znc.git
synced 2026-08-11 11:23:18 +02:00
Merge branch 'master' of github.com:znc/znc
This commit is contained in:
@@ -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
@@ -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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user