当前位置: 首页>>代码示例>>C++>>正文


C++ CChatChannel::GetNext方法代码示例

本文整理汇总了C++中CChatChannel::GetNext方法的典型用法代码示例。如果您正苦于以下问题:C++ CChatChannel::GetNext方法的具体用法?C++ CChatChannel::GetNext怎么用?C++ CChatChannel::GetNext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CChatChannel的用法示例。


在下文中一共展示了CChatChannel::GetNext方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: KillChannels

void CChat::KillChannels()
{
	ADDTOCALLSTACK("CChat::KillChannels");
	CChatChannel * pChannel = GetFirstChannel();
	// First /kick everyone
	for ( ; pChannel != NULL; pChannel = pChannel->GetNext())
		pChannel->KickAll();
	m_Channels.Empty();
}
开发者ID:WangXYZ,项目名称:SphereServer_Source,代码行数:9,代码来源:CChat.cpp

示例2: GetFirstChannel

CChatChannel * CChat::FindChannel(lpctstr pszChannel) const
{
	CChatChannel * pChannel = GetFirstChannel();
	for ( ; pChannel != nullptr; pChannel = pChannel->GetNext())
	{
		if (strcmp(pChannel->GetName(), pszChannel) == 0)
			break;
	}
	return pChannel;
}
开发者ID:Sphereserver,项目名称:Source2,代码行数:10,代码来源:CChat.cpp

示例3:

CChatChannel *CChat::FindChannel(LPCTSTR pszChannel) const
{
	ADDTOCALLSTACK("CChat::FindChannel");
	for ( CChatChannel *pChannel = static_cast<CChatChannel *>(m_Channels.GetHead()); pChannel != NULL; pChannel = pChannel->GetNext() )
	{
		if ( strcmpi(static_cast<LPCTSTR>(pChannel->m_sName), pszChannel) == 0 )
			return pChannel;
	}
	return NULL;
};
开发者ID:bucketyied,项目名称:Source,代码行数:10,代码来源:CChat.cpp

示例4: addChatWindow

void CChatMember::addChatWindow()
{
	ADDTOCALLSTACK("CChatMember::addChatWindow");
	// Called from Event_ChatButton

	CClient *pClient = GetClient();
	if ( !pClient || (!pClient->m_UseNewChatSystem && m_bChatActive) )
		return;

	// Open chat window (old chat system only)
	// On new chat system this is not needed because the chat button is hardcoded on client-side, and
	// PacketChatButton packet is sent by client after login complete only to get initial channel list
	if ( !pClient->m_UseNewChatSystem )
		pClient->addChatSystemMessage(CHATCMD_OpenChatWindow, GetChatName());

	// Send channel names
	for ( CChatChannel *pChannel = static_cast<CChatChannel *>(g_Serv.m_Chats.m_Channels.GetHead()); pChannel != NULL; pChannel = pChannel->GetNext() )
	{
		pClient->addChatSystemMessage(CHATCMD_AddChannel, pChannel->m_sName, pClient->m_UseNewChatSystem ? NULL : pChannel->GetPasswordString());
		if ( (g_Cfg.m_iChatFlags & CHATF_AUTOJOIN) && pChannel->m_bStatic && !GetChannel() )
			g_Serv.m_Chats.JoinChannel(pChannel->m_sName, NULL, this);
	}
}
开发者ID:bucketyied,项目名称:Source,代码行数:23,代码来源:CChat.cpp


注:本文中的CChatChannel::GetNext方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。