Ejemplo n.º 1
0
/**
 * UpdateWhoHelper
 *
 * Updates the realname/servername for a nick.
 *
 * @param Nick the nick
 * @param Realname the realname fot the user
 * @param Server the servername for the user
 */
void CIRCConnection::UpdateWhoHelper(const char *Nick, const char *Realname, const char *Server) {
	int a = 0;

	if (GetOwner()->GetLeanMode() > 0) {
		return;
	}

	while (hash_t<CChannel *> *Chan = m_Channels->Iterate(a++)) {
		if (!Chan->Value->HasNames()) {
			return;
		}

		CNick *NickObj = Chan->Value->GetNames()->Get(Nick);

		if (NickObj) {
			NickObj->SetRealname(Realname);
			NickObj->SetServer(Server);
		}
	}
}