Commit Graph

7 Commits (97bc6918b179fffc29d97908519d50140415b22c)

Author SHA1 Message Date
Giel van Schijndel a385545043 * Don't handle protocol specific encoding in wzmasterserver.py, instead deal with it in the Protocol classes in protocol.py
* Don't set Game's `hosts` value to a list of ''exactly'' 3
  - Instead use empty strings for non-existing hostnames below 3 (when encoding only)
  - This allows for a bit more extensibility in the future.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7365 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-09 23:29:55 +02:00
Giel van Schijndel 3dfb215c8b Add IPv6 support to the lobby protocol
* Add a new field: secondaryHosts, an array of two fallback hosts
  - Canibalize the entire "misc" field and part of the "extra" field for this
  - When connecting, first try the primary "host" field, then fall back to the hosts in secondaryHosts (in order)
 * Add a new field: gameId, used on the lobby server to link multiple lobby connections to a single game entry
  - First (attempt to) connect to the lobby with all available address families (currently IPv4 and IPv6)
  - Then ask for a gameId from the lobby server using the first established lobby connection
  - Set the gameId field in the GAMESTRUCT to the one retrieved
  - Transmit the GAMESTRUCT using a "addg" command to the lobby over each lobby connection
  - The lobby then compares all incoming ID numbers with ID numbers already present
  - If there's a match it will use the GAMESTRUCT already present and only add a new hostname to the list

This is the last change, part of, and closes #452

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7364 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-09 23:29:55 +02:00
Giel van Schijndel 9943cf6b01 Lets not mark utility modules as executable
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7276 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:34 +02:00
Giel van Schijndel eebb624276 * Change the lobby IRC bot to use the same code as the lobby server for protocol handling and game representation
* Move the "list" function (to retrieve the lobby's list of games) to the Protocol class

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7211 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-27 22:46:38 +02:00
Giel van Schijndel d1d787c8d6 * Make the game server's port version dependant
* Move checking of game's vitality to from the Game class to the Protocol class
  - Do this because checking of games is inherently protcol dependant

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7200 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-27 21:30:40 +02:00
Giel van Schijndel 4b74fd0cc5 Don't deal with requestHandler stuff in the Game class
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7199 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-27 21:30:40 +02:00
Giel van Schijndel 7f5bc28bd0 Move the Game, Protocol classes to files of their own (to allow them to be reused by the IRC bot, instead of duplicating code)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7127 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-22 16:03:19 +02:00