Skip to content

Commit

Permalink
Remove legacy relay code
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheeo committed Jan 29, 2016
1 parent 7bc0c5d commit 44f40f3
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 681 deletions.
24 changes: 3 additions & 21 deletions src/client/_clientwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def __init__(self, *args, **kwargs):
fa.instance.finished.connect(self.finishedFA)
fa.instance.error.connect(self.errorFA)

# Local Replay Server (and relay)
# Local Replay Server
self.replayServer = fa.replayserver.ReplayServer(self)

# GameSession
Expand All @@ -200,17 +200,8 @@ def __init__(self, *args, **kwargs):
# ConnectivityTest
self.connectivity = None # type: ConnectivityHelper

# Local Relay Server
self.relayServer = fa.relayserver.RelayServer(self)

# Local proxy servers
self.proxyServer = fa.proxies.proxies(self)
self.localIP = None

if not self.proxyServer and not config.no_dialogs:
QtGui.QMessageBox.warning(self.client, "Cannot use proxy server",
"FAF is unable to bind the port <b>12000 to 12011 on TCP</b>.<br>Please check your firewall settings.<br><b>You may experience connections problems until it's fixed.</b>")

# stat server
self.statsServer = secondaryServer.SecondaryServer("Statistic", 11002, self)

Expand Down Expand Up @@ -598,12 +589,6 @@ def cleanup(self):
self.replayServer.close()
self.replayServer = None

# Terminate local ReplayServer
if self.relayServer:
self.progress.setLabelText("Terminating local relay server")
self.relayServer.close()
self.relayServer = None

# Clean up Chat
if self.chat:
self.progress.setLabelText("Disconnecting from IRC")
Expand Down Expand Up @@ -809,9 +794,6 @@ def doConnect(self):
if not self.replayServer.doListen(LOCAL_REPLAY_PORT):
return False

if not self.relayServer.doListen():
return False

# Begin connecting.
self.socket.connected.connect(self.on_connected)
self.socket.setSocketOption(QtNetwork.QTcpSocket.KeepAliveOption, 1)
Expand Down Expand Up @@ -1259,7 +1241,7 @@ def handle_game_launch(self, message):
arguments.append(str(self.players[self.id]["ladder_rating_deviation"]))

# Launch the auto lobby
self.relayServer.init_mode = 1
self.game_session.init_mode = 1

else:
# Player global rating
Expand All @@ -1272,7 +1254,7 @@ def handle_game_launch(self, message):
arguments.append(self.me.country)

# Launch the normal lobby
self.relayServer.init_mode = 0
self.game_session.init_mode = 0

if self.me.clan is not None:
arguments.append('/clan')
Expand Down
2 changes: 0 additions & 2 deletions src/fa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
import check
import maps
import replayserver
import relayserver
import proxies
import updater
import upnp
import factions
235 changes: 0 additions & 235 deletions src/fa/proxies.py

This file was deleted.

Loading

0 comments on commit 44f40f3

Please sign in to comment.