示例#1
0
文件: User.cpp 项目: MartinNowack/znc
	virtual void RunJob() {
		vector<CIRCNetwork*> vNetworks = m_pUser->GetNetworks();

		for (size_t a = 0; a < vNetworks.size(); a++) {
			CIRCNetwork* pNetwork = vNetworks[a];
			CIRCSock* pIRCSock = pNetwork->GetIRCSock();

			if (pIRCSock && pIRCSock->GetTimeSinceLastDataTransaction() >= 270) {
				pIRCSock->PutIRC("PING :ZNC");
			}

			if (pNetwork->IsIRCConnected()) {
				pNetwork->JoinChans();
			}

			vector<CClient*>& vClients = pNetwork->GetClients();
			for (size_t b = 0; b < vClients.size(); b++) {
				CClient* pClient = vClients[b];

				if (pClient->GetTimeSinceLastDataTransaction() >= 270) {
					pClient->PutClient("PING :ZNC");
				}
			}
		}

		vector<CClient*>& vUserClients = m_pUser->GetUserClients();
		for (size_t c = 0; c < vUserClients.size(); ++c) {
			CClient* pUserClient = vUserClients[c];

			if (pUserClient->GetTimeSinceLastDataTransaction() >= 270) {
				pUserClient->PutClient("PING :ZNC");
			}
		}
	}
示例#2
0
文件: User.cpp 项目: FruitieX/znc
	virtual void RunJob() {
		vector<CClient*>& vUserClients = m_pUser->GetUserClients();
		for (size_t c = 0; c < vUserClients.size(); ++c) {
			CClient* pUserClient = vUserClients[c];

			if (pUserClient->GetTimeSinceLastDataTransaction() >= CIRCNetwork::PING_FREQUENCY) {
				pUserClient->PutClient("PING :ZNC");
			}
		}
	}
示例#3
0
文件: User.cpp 项目: bpcampbe/znc
	virtual void RunJob() {
		vector<CClient*>& vClients = m_pUser->GetClients();
		CIRCSock* pIRCSock = m_pUser->GetIRCSock();

		if (pIRCSock && pIRCSock->GetTimeSinceLastDataTransaction() >= 270) {
			pIRCSock->PutIRC("PING :ZNC");
		}

		for (size_t a = 0; a < vClients.size(); a++) {
			CClient* pClient = vClients[a];

			if (pClient->GetTimeSinceLastDataTransaction() >= 270) {
				pClient->PutClient("PING :ZNC");
			}
		}

		if (m_pUser->IsIRCConnected()) {
			m_pUser->JoinChans();
		}
	}