Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 29, 2006, 9:59:20 AM (18 years ago)
Author:
patrick
Message:

reconnection command deep structure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/proxy/proxy_control.cc

    r9599 r9600  
    1616
    1717#include "class_list.h"
    18 
     18#include "shell_command.h"
    1919
    2020#include "state.h"
    2121#include "shared_network_data.h"
     22#include "network_manager.h"
    2223#include "network_game_manager.h"
    2324#include "ip.h"
     
    3536ProxyControl* ProxyControl::singletonRef = NULL;
    3637
     38
     39SHELL_COMMAND(forceReconnect, ProxyControl, forceReconnectionShell);
    3740
    3841/**
     
    227230
    228231
     232/**
     233 * a shell command wrapper
     234 * @param userId the userId of the client/user :D
     235 * @param serverId the userId of the server to connect to
     236 */
     237void ProxyControl::forceReconnectionShell(int userId, int serverId)
     238{
     239  this->forceReconnection(userId, serverId);
     240}
     241
    229242
    230243/**
     
    332345
    333346      // handle it
    334       if( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServerActive())
     347      if( SharedNetworkData::getInstance()->getHostID() == userId &&
     348         (SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServerActive()))
    335349      {
     350        NetworkManager::getInstance()->reconnectToServer(IP(ipHost, 9999));
    336351      }
    337352      break;
Note: See TracChangeset for help on using the changeset viewer.