Commit Graph

5652 Commits (8bfd2acef1de12aff86f89554929d443292ef076)

Author SHA1 Message Date
Giel van Schijndel 8bfd2acef1 Use a single function to perform the encoding as a C string
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7194 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-27 21:30:39 +02:00
Gerard Krol 98acead64b Prevent power assert for "instant" (no research points needed) research. This fixes bug #424. 2009-04-27 14:04:32 +02:00
Buginator 8a11947b31 Let's only send the map to the person that needs the map.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7178 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-27 12:46:39 +02:00
Buginator 88c534c213 closes ticket:37 Which had a bad case of bitrot.
Adds a new console command 'showorders'  (Must be in debug/cheat mode)
This toggle allows realtime information on the selected unit, and always shows the order / action it is doing.  When the unit is deselected, then it doesn't display anything.




git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7172 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-27 12:46:39 +02:00
Buginator 7ef71df9cb Fixes ticket:419
Add check to make sure logfile is available.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7169 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-27 12:46:38 +02:00
Buginator b69d82d99f Fixes ticket:421
--host works correctly again.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7166 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-27 12:46:38 +02:00
Guangcong Luo 8c06496525 Fix assert when attempting to research free topics.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7165 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-27 12:46:38 +02:00
Buginator b095418a42 Fixes ticket: 369
Don't always assume that the (lobby) server will not be available, and give up on all future attempts.
We now reset the flag on NETclose().



git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7159 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-24 14:16:08 +02:00
Guangcong Luo b17b7823a8 Reformat r7155 to follow coding style
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7157 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-24 14:16:08 +02:00
Guangcong Luo 2a4a462502 Commit patch #374: Fix artillery prediction, submitted by Adam Olsen.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7155 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-24 14:16:08 +02:00
Freddie Witherden b54722604a Update the default configuration so that we do not pause on focus loss.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7154 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-24 14:16:07 +02:00
Buginator 367110ec57 Disable password button for skirmish games.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7150 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-24 14:16:07 +02:00
Per Inge Mathisen af5182dc1a Fix compile on MSVC. Cannot use #ifdef inside a macro.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7149 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-24 14:16:07 +02:00
Buginator 3365cd06f1 Remove superfluous asserts concerning unit's names.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7146 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-24 14:16:07 +02:00
Guangcong Luo 20f0ddc547 Team selector is now labeled "TEAM" and teams are colored and lettered A-H. The original numbers were changed to letters so they can no longer be confused with player numbers.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7142 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-24 14:16:07 +02:00
Guangcong Luo 7420c1cb55 Players are no longer required to lose at least 3 times to earn a medal.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7139 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-24 14:16:07 +02:00
Gerard Krol af88a73dfc The bad hack the "work harder" cheat was using did not play well with the power code. It now just marks the research as finished instead of giving lots of power and research time. 2009-04-24 14:11:24 +02:00
Per Inge Mathisen 0c694a22b0 Introduce ASSERT_OR_RETURN, a macro to assert on an expression, and assert() and then return if it fails,
but only assert() in debug builds.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7136 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-23 01:36:45 +02:00
Gerard Krol 6cb979ac1a The commit to fix the unsigned int underflow (ticket 404) had as unfortunate side effect that building was possible even when out of power. This fixes it. 2009-04-23 01:34:23 +02:00
Git SVN Gateway c17d6fcbd8 Merge commit 'gerard_/master' 2009-04-22 18:08:14 +02:00
Giel van Schijndel cffa0b65af Make BinaryProtocol more flexible to allow it to work with 2.0+ as well as the 2.2 lobby protocol (depending on what parameter was used during construction)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7128 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-22 16:03:19 +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
Gerard Krol d23c6cb1a1 Be extra careful with the buildpoints, as the signed <-> unsigned stuff might have caused problems. This should fix ticket #404. 2009-04-22 13:42:50 +02:00
Giel van Schijndel f95bcd605b Move the IRC bot to the same directory as the lobby server
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7126 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-22 13:18:35 +02:00
Giel van Schijndel 1447766635 Whatever way we leave the bot's mainloop, make sure to terminate the lobby checking thread
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7125 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-22 13:18:35 +02:00
Giel van Schijndel 61d0fd23d0 Don't use Python 2.6 specific syntax (r7123)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7124 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-22 13:18:35 +02:00
Giel van Schijndel 2dc1bcfd12 * Catch and handle all socket errors, not just timeouts
- Don't just report failure to the user that request a lobby listing, report the error message (asociated with the exception) as well


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7123 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-22 13:18:35 +02:00
Buginator f17402ef40 excise the codebase from some C99 format specifiers.
(%zu -> %lu)


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7120 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-22 13:18:34 +02:00
Giel van Schijndel 7b16d058af Fix #400:
* Assert failure trying to append to a non-static stringbuffer using sstrcat
  - The sstrcat wasn't necessary anymore but forgotten to remove in r6714

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7119 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-22 13:18:34 +02:00
Giel van Schijndel e91765af19 * Notify all served IRC channels when shutting down
* Notify all served IRC channels when encoutering an unhandled exception (and shutting down as a result)


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7118 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-22 13:18:34 +02:00
Giel van Schijndel fef445101e * Rename the "help" command to "about"
* Change "commands" to dynamically look through the commands that are available and list them


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7117 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-22 13:18:34 +02:00
Giel van Schijndel a72e7d5288 * Move construction of BotCommands to its own class (__init__)
* Only attempt to call attributes of BotCommands if they're functions (rejecting __.*__ functions)
 * Return from readAndHandle as soon as we've handled a message


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7116 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-22 13:18:34 +02:00
Giel van Schijndel c9113f9730 * Pass the IRC write function as a lambda to BotCommands' functions
* When a user joins a served channel, send him a notice of the games currently present ("list" output)


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7113 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-22 13:18:33 +02:00
Giel van Schijndel b07a743f60 Properly store the gameFormat struct description in the class
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7112 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-22 13:18:33 +02:00
Giel van Schijndel d5cdfd7adb * Add channel operator support
* Add invite support
  - Invite users to all serviced channels when they make a request outside of a serviced channel (becmoing operator only for as long as necessary)


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7106 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-22 13:18:33 +02:00
Giel van Schijndel 6461dd0208 * Send replies only to the channel from which the request came
* Send general messages to all served channels
 * Prefix all replies with the nickname of the user who made the request


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7105 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-22 13:18:33 +02:00
Giel van Schijndel bbfe5e2abd Don't call the IRC command handling function in the try block (we don't want to protect against errors inside the IRC command function)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7104 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-22 13:18:33 +02:00
Giel van Schijndel f1b178e4b0 Add multi-channel support to wzlobbybot, one list of channels in which to serve requests, another just to be present in.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7103 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-22 13:18:32 +02:00
Giel van Schijndel e00035b75a Add the ability for wzlobbybot to identify against NickServ
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7102 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-22 13:18:32 +02:00
Giel van Schijndel 7261e3392a Update the lobbybot such that it can work both with 2.0,2.1 and 2.2 lobbies, defaulting to 2.1 (as that's the current release)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7101 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-22 13:18:32 +02:00
Giel van Schijndel d001fdbafc Notify the user when communication with the lobby fails
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7100 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-22 13:18:32 +02:00
Giel van Schijndel 88ddefb584 * Move the setup code of the lobby bot into a class of its own (Bot)
* Change to an event driven model for handling IRC commands
  - Add all IRC commands to a single class (BotCommands)
  - In class irc_connection.readAndHandle() call the corresponding function in BotCommands for the received IRC command


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7099 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-22 13:18:32 +02:00
Gerard Krol 2786cfc1e9 Add the --squash flag to gitsvngateway. With --squash it will not try to unravel any merges but instead commit it as one change. 2009-04-20 19:53:13 +02:00
Gerard Krol ff92f1c80b When constructing a building, producing a droid or researching something, power is now used gradually instead of being accrued before the process starts.
As repairing droids was almost free anyway, it does no longer use any power now.
2009-04-20 19:23:11 +02:00
Gerard Krol ef94330f3a When starting construction buildings will only have 10% of their final health. This will go up during construction. 2009-04-20 19:22:41 +02:00
Giel van Schijndel 5694b99b90 Set a timeout on the lobby client to prevent blocking on connections to the lobby
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7095 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-20 15:31:24 +02:00
Giel van Schijndel 846a21b8a7 Make sure that the change_notifier thread gets terminated when the user hits CTRL-C
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7094 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-20 15:31:24 +02:00
Giel van Schijndel f8f33d5424 * Interpolate __author__ in the "info" (about-style) message
* Use functions to join channels and send messages
 * Notify a user requesting for services from the bot in the wrong channel


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7093 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-20 15:31:24 +02:00
Giel van Schijndel 64666c8889 Ignore build products from unit tests
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7092 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-20 15:31:23 +02:00
Giel van Schijndel acd07fc7b4 * Add functions for retrieving the masterserver's hostname and port and game hosting port
* Use these functions to save configuration values (instead of duplicating them)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7091 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-20 15:31:23 +02:00