예제 #1
0
파일: charybdis.cpp 프로젝트: SaberUK/anope
	void OnChannelSync(Channel *c) override
	{
		if (!c->ci || !mlocks)
			return;

		if (use_server_side_mlock && Servers::Capab.count("MLOCK") > 0)
		{
			Anope::string modes = mlocks->GetMLockAsString(c->ci, false).replace_all_cs("+", "").replace_all_cs("-", "");
			Uplink::Send(Me, "MLOCK", c->creation_time, c->ci->GetName(), modes);
		}
	}
예제 #2
0
파일: charybdis.cpp 프로젝트: SaberUK/anope
	EventReturn OnUnMLock(ChanServ::Channel *ci, ModeLock *lock) override
	{
		if (!mlocks)
			return EVENT_CONTINUE;

		ChannelMode *cm = ModeManager::FindChannelModeByName(lock->GetName());
		if (use_server_side_mlock && cm && ci->c && (cm->type == MODE_REGULAR || cm->type == MODE_PARAM) && Servers::Capab.count("MLOCK") > 0)
		{
			Anope::string modes = mlocks->GetMLockAsString(ci, false).replace_all_cs("+", "").replace_all_cs("-", "").replace_all_cs(cm->mchar, "");
			Uplink::Send(Me, "MLOCK", ci->c->creation_time, ci->GetName(), modes);
		}

		return EVENT_CONTINUE;
	}