本文整理汇总了C++中CChan::HasPerm方法的典型用法代码示例。如果您正苦于以下问题:C++ CChan::HasPerm方法的具体用法?C++ CChan::HasPerm怎么用?C++ CChan::HasPerm使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CChan
的用法示例。
在下文中一共展示了CChan::HasPerm方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnJoin
void OnJoin(const CNick& Nick, CChan& Channel) override {
// If we have ops in this chan
if (Channel.HasPerm(CChan::Op) || Channel.HasPerm(CChan::HalfOp)) {
for (const auto& it : m_msUsers) {
// and the nick who joined is a valid user
if (it.second->HostMatches(Nick.GetHostMask()) && it.second->ChannelMatches(Channel.GetName())) {
PutIRC("MODE " + Channel.GetName() + " +v " + Nick.GetNick());
break;
}
}
}
}
示例2: OnJoin
virtual void OnJoin(const CNick& Nick, CChan& Channel) {
// If we have ops in this chan
if (Channel.HasPerm(CChan::Op) || Channel.HasPerm(CChan::HalfOp)) {
for (map<CString, CAutoVoiceUser*>::iterator it = m_msUsers.begin(); it != m_msUsers.end(); ++it) {
// and the nick who joined is a valid user
if (it->second->HostMatches(Nick.GetHostMask()) && it->second->ChannelMatches(Channel.GetName())) {
PutIRC("MODE " + Channel.GetName() + " +v " + Nick.GetNick());
break;
}
}
}
}
示例3: OnJoin
virtual void OnJoin(const CNick& Nick, CChan& Channel) {
// If we have ops in this chan
if (Channel.HasPerm(CChan::Op)) {
for (map<CString, CAutoOpUser*>::iterator it = m_msUsers.begin(); it != m_msUsers.end(); it++) {
// and the nick who joined is a valid user
if (it->second->HostMatches(Nick.GetHostMask()) && it->second->ChannelMatches(Channel.GetName())) {
if (it->second->GetUserKey().Equals("__NOKEY__")) {
PutIRC("MODE " + Channel.GetName() + " +o " + Nick.GetNick());
} else {
// then insert this nick into the queue, the timer does the rest
m_msQueue[Nick.GetNick().AsLower()] = "";
}
break;
}
}
}
}
示例4: OnJoin
virtual void OnJoin(const CNick& Nick, CChan& Channel) {
// If we have ops in this chan
if (Channel.HasPerm(CChan::Op)) {
CheckAutoOp(Nick, Channel);
}
}