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 ); }
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 ); }
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 ); } }
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 ); }