~luke-jr/tr2norigins/armagetron-0.2.8-t2o-preferT2OAuth

« back to all changes in this revision

Viewing changes to src/engine/ePlayer.cpp

  • Committer: Manuel Moos
  • Date: 2008-03-10 16:05:43 UTC
  • Revision ID: z-man@users.sf.net-20080310160543-or6d04u4wd2lqf86
Cleaned up a bit of the configuration recording and playback chaos. "Quit" console command is broken on playback currently in some situations.
Silenced /msg chat no longer echoed to administrators and server console.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2326
2326
    
2327
2327
    // install filter
2328
2328
    eAdminConsoleFilter consoleFilter( p->Owner() );
2329
 
    
2330
 
    if ( tRecorder::IsPlayingBack() )
2331
 
    {
2332
 
        tConfItemBase::LoadPlayback();
2333
 
    }
2334
 
    else
2335
 
    {
2336
 
        tConfItemBase::LoadLine(stream);
2337
 
    }
 
2329
    tConfItemBase::LoadLine(stream);
2338
2330
}
2339
2331
 
2340
2332
static void handle_chat_admin_commands( ePlayerNetID * p, tString const & command, tString const & say, std::istream & s )
2711
2703
        tColoredString toServer = se_BuildChatString( p, receiver, msg_core );
2712
2704
        toServer << '\n';
2713
2705
        
2714
 
        // log locally
2715
 
        sn_ConsoleOut(toServer,0);
2716
 
        
2717
2706
        if ( p->CurrentTeam() == receiver->CurrentTeam() || !IsSilencedWithWarning(p) )
2718
2707
        {
 
2708
            // log locally
 
2709
            sn_ConsoleOut(toServer,0);
 
2710
        
2719
2711
            // log to sender's console
2720
2712
            sn_ConsoleOut(toServer, p->Owner());
2721
2713
            
2722
2714
            // send to receiver
2723
2715
            if ( p->Owner() != receiver->Owner() )
2724
2716
                se_SendPrivateMessage( p, receiver, receiver, msg_core );
2725
 
        }
2726
2717
 
2727
 
        // let admins of sufficient rights eavesdrop
2728
 
        for( int i = se_PlayerNetIDs.Len() - 1; i >=0; --i )
2729
 
        {
2730
 
            ePlayerNetID * admin = se_PlayerNetIDs(i);
 
2718
            // let admins of sufficient rights eavesdrop
 
2719
            for( int i = se_PlayerNetIDs.Len() - 1; i >=0; --i )
 
2720
            {
 
2721
                ePlayerNetID * admin = se_PlayerNetIDs(i);
2731
2722
            
2732
 
            if ( admin != receiver && admin != p && admin->GetAccessLevel() <=  se_msgSpyAccessLevel )
2733
 
            {
2734
 
                se_SendPrivateMessage( p, receiver, admin, msg_core );
 
2723
                if ( admin != receiver && admin != p && admin->GetAccessLevel() <=  se_msgSpyAccessLevel )
 
2724
                {
 
2725
                    se_SendPrivateMessage( p, receiver, admin, msg_core );
 
2726
                }
2735
2727
            }
2736
2728
        }
2737
2729
    }