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; } } } }
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; } } } }
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; } } } }
virtual void OnJoin(const CNick& Nick, CChan& Channel) { // If we have ops in this chan if (Channel.HasPerm(CChan::Op)) { CheckAutoOp(Nick, Channel); } }