Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 4, 2008, 8:53:10 PM (16 years ago)
Author:
rgrieder
Message:

merged network branch back to trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/network/Client.cc

    r1505 r1534  
    4242#include "Synchronisable.h"
    4343#include "core/CoreIncludes.h"
     44#include "core/ConsoleCommand.h"
     45#include "Server.h"
    4446
    4547namespace network
    4648{
     49  SetConsoleCommandShortcut(Client, Chat);
     50 
    4751  Client* Client::_sClient = 0;
    4852 
     
    142146 
    143147
     148  void Client::Chat( std::string message ){
     149    if(Client::getSingleton())
     150      Client::getSingleton()->sendChat(message);
     151    else if(Server::getSingleton())
     152      Server::getSingleton()->sendChat(message);
     153    else
     154      COUT(1) << "do you want to monologize ??" << std::endl;
     155  }
    144156 
    145157
     
    224236  }
    225237
    226   void Client::processChat( chat *data){
    227     COUT(0) << "Server: " << data->message << std::endl;
     238  void Client::processChat( chat *data, int clientId){
     239    COUT(1) << data->message << std::endl;
    228240    delete[] data->message;
    229241    delete data;
Note: See TracChangeset for help on using the changeset viewer.