Exemplo n.º 1
0
void CChatChannel::RemoveVoice(CChatMember *pByMember, LPCTSTR pszName)
{
	ADDTOCALLSTACK("CChatChannel::RemoveVoice");

	LPCTSTR pszByName = pByMember->GetChatName();
	if ( !IsModerator(pszByName) )
	{
		pByMember->SendChatMsg(CHATMSG_MustHaveOps);
		return;
	}

	CChatMember *pMember = FindMember(pszName);
	if ( !pMember )
	{
		pByMember->SendChatMsg(CHATMSG_NoPlayer, pszName);
		return;
	}
	pszName = pMember->GetChatName();	// fix case-sensitive mismatch
	if ( !HasVoice(pszName) )
		return;

	SetVoice(pszName, true);
	SendMember(pMember);	// update name color
	pMember->SendChatMsg(CHATMSG_ModeratorHasRemovedSpeakPriv, pszByName);
	Broadcast(CHATMSG_PlayerNoSpeaking, pszName);
}
Exemplo n.º 2
0
void JamCracker::NewNote(void)
{
	NoteInfo *adr;
	PattInfo *pattInfo;

	adr = address;
	address += 4;		// Go to the next row

	if (--noteCnt == 0)
	{
		songPos++;
		if (--songCnt == 0)
		{
			songPos = 0;
			songCnt = songLen;

			//
			// Next module
			//
			endReached = true;
		}

		//
		// Next position
		//
		ChangePosition();

		pattInfo = &pattTable[songTable[songPos]];
		noteCnt  = pattInfo->size;
		address  = pattInfo->address;
	}

	tmpDMACON = 0;
	NwNote(adr, &variables[0]);
	NwNote(++adr, &variables[1]);
	NwNote(++adr, &variables[2]);
	NwNote(++adr, &variables[3]);

	SetVoice(&variables[0]);
	SetVoice(&variables[1]);
	SetVoice(&variables[2]);
	SetVoice(&variables[3]);
}
Exemplo n.º 3
0
bool CChatChannel::AddMember(CChatChanMember * pMember)
{
	ADDTOCALLSTACK("CChatChannel::AddMember");
	pMember->SetChannel(this);
	m_Members.Add( pMember );
	// See if only moderators have a voice by default
	LPCTSTR pszName = pMember->GetChatName();
	if (!GetVoiceDefault() && !IsModerator(pszName))
		// If only moderators have a voice by default, then add this member to the list of no voices
		SetVoice(pszName, false);
	// Set voice status
	return true;
}
Exemplo n.º 4
0
void CChatChannel::AddMember(CChatMember *pMember)
{
	ADDTOCALLSTACK("CChatChannel::AddMember");
	pMember->SetChannel(this);
	m_Members.Add(pMember);

	LPCTSTR pszName = pMember->GetChatName();
	if ( !IsModerator(pszName) )
	{
		// Check if only moderators have voice by default
		if ( !m_bDefaultVoice )
			SetVoice(pszName);

		// GMs always have moderation privs
		CClient *pClient = pMember->GetClient();
		if ( pClient && pClient->IsPriv(PRIV_GM) )
			SetModerator(pszName);
	}
}
Exemplo n.º 5
0
void CChatChannel::RevokeVoice(CChatChanMember * pByMember, LPCTSTR pszName)
{
	ADDTOCALLSTACK("CChatChannel::RevokeVoice");
	if (!IsModerator(pByMember->GetChatName()))
	{
		pByMember->SendChatMsg(CHATMSG_MustHaveOps);
		return;
	}
	CChatChanMember * pMember = FindMember(pszName);
	if (!pMember)
	{
		pByMember->SendChatMsg(CHATMSG_NoPlayer, pszName);
		return;
	}
	if (!HasVoice(pszName))
		return;
	SetVoice(pszName, false);
	SendThisMember(pMember); // Update the color
	pMember->SendChatMsg(CHATMSG_ModeratorRemovedSpeaking, pByMember->GetChatName());
	Broadcast(CHATMSG_PlayerNoSpeaking, pszName, "", "");
}