Exemplo n.º 1
0
void CWaitingGeneral::HandleReply( CHotlineTransaction* pTrans, class CHotlineConnection* pConnection )
	{
	if ( !pTrans->GetError( ) )
		// Pas d'erreur, ok...
		return;

	CItem* pItem = pTrans->GetItemByType( HLO_ERRORMSG );
	pConnection->OnGeneralError( m_sDescription, ( pItem ) ? pItem->AsString( ) : NULL );
	}
Exemplo n.º 2
0
void CWaitingPrivateMessage::HandleReply( CHotlineTransaction* pTrans, class CHotlineConnection* pConnection )
	{
	ASSERT_VALID( pTrans );
	ASSERT( pConnection );
	if ( pTrans->GetError( ) )
		{
		CItem* pErrorMessage = pTrans->GetItemByType( HLO_ERRORMSG );
		pConnection->OnPrivateMessageSent( false, ( pErrorMessage ) ? LPCSTR( pErrorMessage->AsString( ) ) : NULL );
		}
	else
		pConnection->OnPrivateMessageSent( true );
	}
Exemplo n.º 3
0
void CWaitingUserInfo::HandleReply( CHotlineTransaction* pTrans, class CHotlineConnection* pConnection )
	{
	ASSERT_VALID( pTrans );
	ASSERT( pConnection );
	if ( pTrans->GetError( ) )
		{
		CItem* pErrorMessage = pTrans->GetItemByType( HLO_ERRORMSG );
		pConnection->UserInfoReceived( false, m_iUserSocket, NULL, ( pErrorMessage ) ? LPCSTR( pErrorMessage->AsString( ) ) : NULL );
		}
	else
		{
		CItem* pInfo = pTrans->GetItemByType( HLO_MESSAGE );
		pConnection->UserInfoReceived( true, m_iUserSocket, ( pInfo ) ? LPCSTR( pInfo->AsString( ) ) : NULL );
		}
	}
Exemplo n.º 4
0
void CWaitingKickBan::HandleReply( CHotlineTransaction* pTrans, class CHotlineConnection* pConnection )
	{
	ASSERT_VALID( pTrans );
	ASSERT( pConnection );
	if ( pTrans->GetError( ) )
		{
		CItem* pErrorMessage = pTrans->GetItemByType( HLO_ERRORMSG );
		pConnection->OnKickFailed( m_iUserSocket, m_bBan, m_bPermBan, ( pErrorMessage ) ? LPCSTR( pErrorMessage->AsString( ) ) : NULL );
		}
	else
		pConnection->OnKickSuccessful( m_iUserSocket, m_bBan, m_bPermBan, m_sUserName, m_sUserIP );
	}