Commit Graph

476 Commits (65ed483d69d362f17bff7c0397c268b99b52373a)

Author SHA1 Message Date
Per Inge Mathisen 0405c24fb1 simplipie: Now modify PIE file in place. Makes it easier to run in scripts.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8436 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:20:00 +01:00
Per Inge Mathisen bb3975f089 Add new tool: simplipie. It strips unused flags from PIE files and rewrites them.
It also obsoletes the no cull flag by removing it and instead adding duplicate,
reversed polygons to fix the culling issues this flags was meant to fix.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8306 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:19:49 +01:00
Christian Ohm 68841a105b Blender PIE import plugin: Add a default filename for the file selector
Makes it start in the current directory instead of $HOME.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8304 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:19:48 +01:00
Giel van Schijndel 593c8fdb0a Lobby server: use Python's enumerate builtin to iterate over a sequence and its indices
- instead of looping over indices alone and using those indices later on to index into the sequence

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8145 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-28 22:21:07 +02:00
Giel van Schijndel 870233db9a * Don't (attempt to) import an unused (and non-existent) module: `model`
* Fix the URL for the TicketNotifications Trac-plugin such that it matches its source directory again

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8039 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:13 +02:00
Giel van Schijndel cb279c37c4 * Rename Trac plugin `NewTicketNotification` to the more general `TicketNotifications`
* Add an additional package (sub-plugin): attachmentnotification
  - This package contains the new AttachmentTicketNotification Trac component
 * Add a new Trac component: AttachmentTicketNotification
  - This component sends notification mails to all ticket subscribers when an attachment is added to that ticket
  - Created this component on Per's request

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8038 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:13 +02:00
Giel van Schijndel fcaf404d25 Log exceptions using the ''exception'' log level/function
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8037 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:13 +02:00
Giel van Schijndel 3563f00a31 Trac NewTicketNotification plugin:
* Add an admin panel to allow configuration of notification addresses (requires the TRAC_ADMIN permission)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8021 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:11 +02:00
Giel van Schijndel 550053ddc9 Trac NewTicketNotification plugin:
* Move support for retrieving and saving the list of notification addresses to a separate module: model.py

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8020 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:11 +02:00
Giel van Schijndel 0ee9fdfb66 Add custom Trac plugin: NewTicketNotification:
* Extends Trac to notify a configured set of e-mail addresses upon ticket creation.
  - Used by us to mail the development mailinglist for each newly created ticket

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8019 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:10 +02:00
Per Inge Mathisen b531c153f7 mapconv: Also convert gameType and gameTime from missions to new format.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8018 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:10 +02:00
Per Inge Mathisen 7866c35fcb mapload: Do not error out when encountering maps without map or terrain info. Deal with it.
mapconv: Handle maps without map and terrain info (such as map expand missions).


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8017 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:10 +02:00
Per Inge Mathisen 650be0e27e mapconv: Now saves in same directory as read from, puts map files in correct directory, and generates a useful game.ini file
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7976 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:05 +02:00
Per Inge Mathisen 272bad92b1 Support version 2 of the WZM format. It now defines type and angles and angle restrictions of connector,
and allows string names for meshes instead of merely an index number.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7951 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:01 +02:00
Elio Gubser 229b039492 fix path
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7950 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:01 +02:00
Per Inge Mathisen 4ff191aeea Fix compilation of map tools. Add support for version 10 game files with power information.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7905 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:53 +02:00
Per Inge Mathisen fe7b8fc515 mapconv: Fix key typos. Implement scroll limits and level name.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7693 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-09 23:44:26 +02:00
Per Inge Mathisen ec95a12e54 Implement entire Deliverance format in new PNG/INI format. That is, the binary map format
delivered by editworld and used for skirmish and campaign maps.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7692 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-09 23:44:26 +02:00
Per Inge Mathisen 5a5a637ecd Clean up map tools a bit. Add new tool mapconvert that converts existing maps to proposed new map format
based on INI and PNG files.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7691 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-09 23:44:25 +02:00
Giel van Schijndel df13cc83ee Fix a typo: NotImlementedError -> NotImplementedError
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7502 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-28 09:59:24 +02:00
Giel van Schijndel 103a2137f9 Lobbyserver: handle and ignore the case where sending of status messages isn't supported by the current protocol
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7501 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-28 09:59:24 +02:00
Giel van Schijndel 3b7a1bd8dc Use Python's NotImlementedError exception instead of an assert(false) to indicate the lack of an implementation.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7500 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-28 09:59:24 +02:00
Guangcong Luo cf3ea876f9 Commit ticket #423 - Add a tech tree chart generator to the tools.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7449 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-16 16:07:15 +02:00
Giel van Schijndel e959170609 Don't try referencing "not yet" defined variables
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7399 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-15 22:29:31 +02:00
Giel van Schijndel 29201b4c53 Lobby server: Display the "Removing aborted game" message when removing a game
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7397 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-15 22:29:31 +02:00
Giel van Schijndel e5e90e5121 Lobbyserver: Append to the host list instead of trying to its first (possibly non-existing) element
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7391 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-15 22:29:30 +02:00
Giel van Schijndel 7afaa55bc5 Properly handle the fact that Game.hosts is now a variably-sized list
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7372 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-10 19:18:11 +02:00
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 a43e84e0fd Lobby server: in the "Game unreachable" message, sent when the connection test fails, give the port number of the game server, not the lobby server
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7343 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:42 +02:00
Giel van Schijndel a71b83b91b On platforms that don't support IPV6_V6ONLY, just ignore it and hope the platform doesn't automatically enable IPv6 mapped IPv4 addresses
This allows the lobby server to be used on platforms that don't support IPV6_V6ONLY socket option.

Thanks to Buginator for reporting this.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7342 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:41 +02:00
Giel van Schijndel e672ad000e Fix error introduced in r7323: gameHost is a member of "self" now, not a local variable
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7324 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:40 +02:00
Giel van Schijndel d02f591709 Lobby protocol; change the way the "addg" command works:
* Make the "addg" command return a status code (ranging 200-299 on success) and message (MOTD on succes)
 * Don't use the "motd" command anymore to check the lobby status, instead use the returned status code for that purpose.
 * Allow MOTD strings of arbitrary length (by sending along the length)

This modification ensures that ''proper'' connectivity checking is being performed on the game server (and reported to the user accurately).

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7323 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:40 +02:00
Giel van Schijndel 7c49ed6628 Lobby utility library:
* Create another custom context manager (can be used in with-statement) for creating a connection to a given (host, port): "connection"
  - Perform manual name-resolution, using each returned entry until one can be succesfully connected to (allows IPv4 + IPv6 through the same function)
 * Use this context manager instead of connecting manually

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7305 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:38 +02:00
Giel van Schijndel 24cc8fda66 Use the "Protocol" constructor function instead of trying to use "BinaryProtocol" (which doesn't exist anymore)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7304 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:38 +02:00
Giel van Schijndel e0adf0d0e8 Revert r7276's accidental change to wzmasterserver.py
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7277 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:34 +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 8b7f17e2e5 Fix _swap_endianness() to return it's argument endian-swapped, not a tuple containing that result
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7273 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:33 +02:00
Giel van Schijndel 7e7ba74801 Move exception handling to the location where RequestHandler.handle(self) is being invoked from
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7269 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:33 +02:00
Giel van Schijndel 36dc3d8c6c Use the RequestHandler's finish() method for cleaning up any open games instead of a try-finally block
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7268 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:33 +02:00
Giel van Schijndel 6618674111 Fix a syntax error from r7266 (and a disconnected spelling error while we're at it)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7267 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:33 +02:00
Giel van Schijndel 0c7f44ee70 Make gamedblock intrinsic to GameDB itself (i.e. let it contain its own lock)
* Return generators instead of entire lists and have the generator keep the lock intact while it's being iterated over

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7266 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:32 +02:00
Giel van Schijndel 3153a9f63d Make sure to reset the "requests" counter when checkInterval is reached
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7265 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:32 +02:00
Giel van Schijndel 563ff537a1 Lobbyserver: Use separate sockets to listen on IPv4 and IPv6 (instead of a single socket which uses IPv4 to IPv6 mapping)
* Use select(2) to wait for a connection on both sockets and accept(2)ing them in a separate thread
 * This prevents IPv4 addresses from becoming IPv6 mapped, which might not be properly supported on all platforms
  - The IPv6 mapped addresses where transferred back to clients

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7264 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:32 +02:00
Giel van Schijndel fb4c443dd8 Update the lobby server to still be in sync with the 2.2 lobby protocol which was changed in r7239
Use 40 bytes for the "host" (IP address) in GAMESTRUCT, this allows for using IPv6 without breaking protocol combatility again

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7249 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:30 +02:00
Giel van Schijndel b665aa67ba Update the lobby server to still be in sync with the 2.2 lobby protocol which was changed in r7246
Move GAMESTRUCT_VERSION to the top of GAMESTRUCT, thus allowing versioning to work properly at all times

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7248 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:30 +02:00
Giel van Schijndel ebd93276a6 Make the lobby server listen and operate on IPv6
* Also disable IPV6_V6ONLY to make sure that (on systems that support the option) IPv4 is still supported, using the same socket
  - This option works on Linux from 2.4.21 and 2.6 (according to "man ipv6")
  - On FreeBSD this works from version 6 onward (lower versions might work, I only tested on 6 and 7 and didn't find any note in the manual)
  - Furthermore, according to
    http://en.wikipedia.org/wiki/IPv4_mapped_address:
   * This works on Windows from Vista onward
   * This works on NetBSD (version unspecified)
   * This doesn't work on OpenBSD (as a design decision for security)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7225 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 20:52:19 +02:00
Giel van Schijndel 66b09c68ec * Fix a copy/paste error
- Make sure to use the maxPlayers and currentPlayers variables found in the Game class, not the (non-existing) local variables
 * Don't use Game.check() as it doesn't exist, use Protocol.check(Game) instead

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7224 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 20:52:19 +02:00
Giel van Schijndel c2e33dc923 * Make the lobby host and version configurable
* Use the "Protocol" instead of "BinaryProtocol" class to communicate with the lobby (in the IRC bot)


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7221 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 20:52:18 +02:00
Giel van Schijndel b5e6967f73 * Fix copy-paste error ("output" should be "input")
* Stop decoding as soon as an error is encountered


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7220 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 20:52:18 +02:00