本文整理汇总了C++中VAttachIter类的典型用法代码示例。如果您正苦于以下问题:C++ VAttachIter类的具体用法?C++ VAttachIter怎么用?C++ VAttachIter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了VAttachIter类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: Del
bool Del(bool bNegated, const CString& sChan, const CString& sHost) {
VAttachIter it = FindEntry(sChan, sHost);
if (it == m_vMatches.end() || it->IsNegated() != bNegated)
return false;
DelNV(it->ToString());
m_vMatches.erase(it);
return true;
}
开发者ID:IshaqAzmi,项目名称:GKZNC,代码行数:10,代码来源:autoattach.cpp
示例2: FindEntry
VAttachIter FindEntry(const CString& sChan, const CString& sHost) {
VAttachIter it = m_vMatches.begin();
for (; it != m_vMatches.end(); ++it) {
if (sHost.empty() || it->GetHostMask() != sHost)
continue;
if (sChan.empty() || it->GetChans() != sChan)
continue;
return it;
}
return m_vMatches.end();
}
开发者ID:IshaqAzmi,项目名称:GKZNC,代码行数:11,代码来源:autoattach.cpp
示例3: Add
bool Add(bool bNegated, const CString& sChan, const CString& sHost) {
CAttachMatch attach(sChan, sHost, bNegated);
// Check for duplicates
VAttachIter it = m_vMatches.begin();
for (; it != m_vMatches.end(); ++it) {
if (it->GetHostMask() == attach.GetHostMask()
&& it->GetChans() == attach.GetChans())
return false;
}
m_vMatches.push_back(attach);
// Also save it for next module load
SetNV(attach.ToString(), "");
return true;
}
开发者ID:IshaqAzmi,项目名称:GKZNC,代码行数:18,代码来源:autoattach.cpp
示例4: HandleList
void HandleList(const CString& sLine) {
CTable Table;
Table.AddColumn("Neg");
Table.AddColumn("Chan");
Table.AddColumn("Host");
VAttachIter it = m_vMatches.begin();
for (; it != m_vMatches.end(); ++it) {
Table.AddRow();
Table.SetCell("Neg", it->IsNegated() ? "!" : "");
Table.SetCell("Chan", it->GetChans());
Table.SetCell("Host", it->GetHostMask());
}
if (Table.size()) {
PutModule(Table);
} else {
PutModule("You have no entries.");
}
}
开发者ID:IshaqAzmi,项目名称:GKZNC,代码行数:20,代码来源:autoattach.cpp
示例5: TryAttach
void TryAttach(const CNick& Nick, CChan& Channel, CString& Message) {
const CString& sChan = Channel.GetName();
const CString& sHost = Nick.GetHostMask();
const CString& sMessage = Message;
VAttachIter it;
if (!Channel.IsDetached()) return;
// Any negated match?
for (it = m_vMatches.begin(); it != m_vMatches.end(); ++it) {
if (it->IsNegated() && it->IsMatch(sChan, sHost, sMessage)) return;
}
// Now check for a positive match
for (it = m_vMatches.begin(); it != m_vMatches.end(); ++it) {
if (!it->IsNegated() && it->IsMatch(sChan, sHost, sMessage)) {
Channel.AttachUser();
return;
}
}
}
开发者ID:Adam-,项目名称:znc,代码行数:21,代码来源:autoattach.cpp
注:本文中的VAttachIter类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论