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