A couple of proposed patches

Peter Pentchev roam at ringlet.net
Thu Mar 5 15:20:11 UTC 2015


Hi,

First of all, thanks for writing and maintaining monopd!

What do you think about the attached two patches that are in the process
of being added to the Debian package of monopd?  The first one updates
the configure script so that it works with recent versions of systemd
that coalesce all the libsystemd-* libraries into a single libsystemd;
the second one fixes some typographical and grammatical errors in
the documentation and the human-readable messages sent to the clients.

If something goes wrong with this e-mail, the patches may be found at
https://anonscm.debian.org/cgit/pkg-games/monopd.git/tree/debian/patches?h=jessie-experimental

If you have any objections or suggestions regarding these patches,
please feel free to let us know - I hereby assume all responsibility for
wreaking them upon monopd :)

Thanks in advance for your time, and keep up the great work!

G'luck,
Peter

-- 
Peter Pentchev  roam at ringlet.net roam at FreeBSD.org p.penchev at storpool.com
PGP key:        http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint 2EE7 A7A5 17FC 124C F115  C354 651E EFB0 2527 DF13
-------------- next part --------------
Description: Check for libsystemd in preference to libsystemd-daemon.
Forwarded: not-yet
Author: Peter Pentchev <roam at ringlet.net>
Debian-Bug: https://bugs.debian.org/779763
Last-Update: 2015-03-05

--- a/configure.ac
+++ b/configure.ac
@@ -29,10 +29,13 @@
             [Add support for systemd startup notification (default is autodetected)]),
             [USE_SYSTEMD_DAEMON=$withval], [USE_SYSTEMD_DAEMON=auto])
 AS_IF([test "x$USE_SYSTEMD_DAEMON" != "xno"], [
-    PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd-daemon],
+    PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd],
         [AC_DEFINE(USE_SYSTEMD_DAEMON, 1, [Use systemd startup notification])],
-        [AS_IF([test "x$USE_SYSTEMD_DAEMON" = "xyes"],
-            [AC_MSG_ERROR([systemd startup notification support requested, but libsystemd-daemon not found.])]
+        [PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd-daemon],
+            [AC_DEFINE(USE_SYSTEMD_DAEMON, 1, [Use systemd startup notification])],
+            [AS_IF([test "x$USE_SYSTEMD_DAEMON" = "xyes"],
+                [AC_MSG_ERROR([systemd startup notification support requested, but libsystemd-daemon not found.])]
+            )]
         )]
     )
 ])
-------------- next part --------------
Description: Fix a couple of typographical and grammatical errors.
Forwarded: not-yet
Author: Peter Pentchev <roam at ringlet.net>
Last-Update: 2015-03-05

--- a/API
+++ b/API
@@ -26,7 +26,7 @@
 -----------------
 
 Commands from clients to the monopd server are in the form of a tiny message
-preceeded by a dot and followed by a newline:
+preceded by a dot and followed by a newline:
 
 .gn
 
@@ -43,7 +43,7 @@
 	</gamelist>
 </monopd>
 
-should be parsed by clients as five seperate (and all invalid) messages.
+should be parsed by clients as five separate (and all invalid) messages.
 
 <monopd><msg type="info" value="Rob throws a 6 and a 2."/></monopd>
 
@@ -53,15 +53,15 @@
 newlines, for readability.
 
 There have been complaints of monopd sending multiple root elements in one
-"document", but unless there's a bug somewhere, newline seperated messages
-itself should not contain more than one root element. Please do treat data
+"document", but unless there's a bug somewhere, newline-separated messages
+themselves should not contain more than one root element. Please do treat data
 after a newline as a new document. Most modern network APIs provide methods
 such as canReadLine() and readLine() which are optimised for this usage.
 
 Not all fields of the XML messages are sent on every update; clients are to
 assume that anything not referred to is either undefined if there has been no
 previous mention of the attribute, or that it keeps the same value as the
-last update that included it set it to. These incremental updates decreases
+last update that included it set it to. These incremental updates decrease
 the amount of data sent over the network.
 
 The encoding of the protocol is UTF-8.
@@ -150,7 +150,7 @@
 .Tm$1:$2:$3:$4 : Player $2 gives $3 an amount of $4 as part of trade $1.
 .Ta$1:$2       : Accept current (revision $2) terms of trade with tradeid $1.
 .Ta$1          : Accept current terms of trade with tradeid $1. (WARNING:
-                 deprecated. Exists for backwards compatiblity but clients
+                 deprecated. Exists for backwards compatibility but clients
                  are encouraged to use the above command instead)
 .Tr$1          : Reject trade $1.
 
@@ -214,7 +214,7 @@
 ===============================================================================
 
 While they won't come like this from the server, I've split some messages
-onto more than one line for readibility.  Each line of messages is enclosed
+onto more than one line for readability.  Each line of messages is enclosed
 by <monopd> and </monopd>.
 
 --------------------
@@ -273,7 +273,7 @@
     bankrupt="bool" hasturn="bool" can_roll="bool" can_buyestate="bool"
     host="string" spectator="bool" hasdebt="bool" canauction="bool" canusecard="bool" />
 
-Most of these are obvious. Directmove is a suggestion to clients about if
+Most of these are obvious. Directmove is a suggestion to clients whether
 they should animate tokens (or not, directmove is 1 for "go directly to
 jail"). Master is 1 or 0 depending on whether the player is the controlling
 player in a game and spectator indicates whether a player is participating
@@ -335,7 +335,7 @@
 when a component is removed, money objects are removed when money is 0),
 "accepted" (at which point the ownerships are being transferred).
 
-Actor is the playerid of the player initiating the tradeof rejecting it.
+Actor is the playerid of the player initiating the trade or rejecting it.
 
 Tradeplayer's accept field denotes whether that player has agreed to the
 current terms of the trade; this is reset to 0 upon any change and must be
@@ -417,7 +417,7 @@
 </configupdate>
 
 Allows clients to view/configure options (editing might only be available
-before game start!). Supported types are: bool. Edit is a boolean to tell
+before the game starts!). Supported types are: bool. Edit is a boolean to tell
 clients whether this option can be edited or not. Commands should be
 postfixed with the configuration value: for bools 0 or 1, such as .geaf1
 
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,7 @@
 -----
 
 - bugfix: wrong estate was chosen when selling an estate, the current estate
-  was chosen instead of the player selected estate
+  was chosen instead of the player-selected estate
 - bugfix: fixed bind() on Mac OS X and probably some others
 
 0.9.6
@@ -158,11 +158,11 @@
 - bugfix: change master attribute before sending playerupdate when creating a game
 - bugfix: init Auction::m_highBidder in constructor
 - bugfix: proper check for housePrice in Player::buyHouse
-- bugfix: don't mess with auction events when on unsuccesful bid
+- bugfix: don't mess with auction events when on unsuccessful bid
 - bugfix: allow building *houses* when max hotels reached
 - bugfix: change player name in game description
 - bugfix: only set edit=1 for master in configupdate
-- bugfix: unmortgage estates thatare sold to the bank on bankrupcy
+- bugfix: unmortgage estates thatare sold to the bank on bankruptcy
 
 2002-12-24 (monopd-0.6.2)
 ----------
@@ -196,7 +196,7 @@
 - gcc 3.2 compilation fixes
 - updated DESIGN document
 - deleting tradecomponents in trade deconstructor no longer crashes
-- CONFIG: Card::jailcard is now seperated into Card::outofjail bool and
+- CONFIG: Card::jailcard is now separated into Card::outofjail bool and
   Card::canbeowned bool, to allow for different types of ownable cards in the
   future
 - support for trading of jail cards
@@ -217,7 +217,7 @@
 - CONFIG: move min/max players to config file
 - ported to libcapsinetwork 0.2.0
 - API: moved newturn message to playerupdate attribute hasturn
-- remove Cards+Estates from Trades when owner changes (bankrupcy/trade/card usage)
+- remove Cards+Estates from Trades when owner changes (bankruptcy/trade/card usage)
 - API: allow for reconnect with .R
 - handle passing of estates elegantly
 - CONFIG: remove nexutil and nextrr with advancetonextof=groupname,
@@ -227,7 +227,7 @@
 ----------
 
 - if you are insolvent on third roll of the dice in jail it doesn't end the turn right
-- correctly move player to destination on succesful jail roll
+- correctly move player to destination on successful jail roll
 - allow players to go "back" (leaving a game)
 - valgrind fixes, including huge memory leak in escapeXML
 - free parking target for estates (cards/jail/taxes)
@@ -795,7 +795,7 @@
 2001-06-19 (cap)
 ----------
 
-- Changed game name into description (makes more sense) and issued seperate
+- Changed game name into description (makes more sense) and issued separate
   command for it (.gd) so the master can change the description.
 - Prepared some stuff for Chance/CC jailcards.
 
@@ -823,7 +823,7 @@
 ----------
 
 - Bugfix: double count must be reset after being sent to jail.
-- Added Player::solvent() function to seperate money checking from
+- Added Player::solvent() function to separate money checking from
   Player::pay()
 - B & O Railroad -> B & O Railroad. Change is currently in config file,
   I guess we should transform it ourselves before sending as XML?
@@ -999,7 +999,7 @@
 2001-04-28
 ----------
 
-- API decision: messages are seperated by newlines. Syntax within a message
+- API decision: messages are separated by newlines. Syntax within a message
   is yet unspecified, although it will probably use a subset of XML.
 - gamelist is printed in tiny XML.
 
@@ -1008,7 +1008,7 @@
 
 - turn-based game, .r only allowed on players turn [Milestone I bugfix]
 - complete redesign of user, game, player and ownership relations
-- seperate class for estate entities, names and prices from file
+- separate class for estate entities, names and prices from file
 - to_jail property for estates
 - buying properties and collecting rent are supported in the game, however
   there are no commands in the API yet to buy properties. unowned properties
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,7 @@
 -----
 
 - bugfix: wrong estate was chosen when selling an estate, the current estate
-  was chosen instead of the player selected estate
+  was chosen instead of the player-selected estate
 - bugfix: fixed bind() on Mac OS X and probably some others
 
 0.9.6
@@ -158,11 +158,11 @@
 - bugfix: change master attribute before sending playerupdate when creating a game
 - bugfix: init Auction::m_highBidder in constructor
 - bugfix: proper check for housePrice in Player::buyHouse
-- bugfix: don't mess with auction events when on unsuccesful bid
+- bugfix: don't mess with auction events when on unsuccessful bid
 - bugfix: allow building *houses* when max hotels reached
 - bugfix: change player name in game description
 - bugfix: only set edit=1 for master in configupdate
-- bugfix: unmortgage estates thatare sold to the bank on bankrupcy
+- bugfix: unmortgage estates thatare sold to the bank on bankruptcy
 
 2002-12-24 (monopd-0.6.2)
 ----------
@@ -196,7 +196,7 @@
 - gcc 3.2 compilation fixes
 - updated DESIGN document
 - deleting tradecomponents in trade deconstructor no longer crashes
-- CONFIG: Card::jailcard is now seperated into Card::outofjail bool and
+- CONFIG: Card::jailcard is now separated into Card::outofjail bool and
   Card::canbeowned bool, to allow for different types of ownable cards in the
   future
 - support for trading of jail cards
@@ -217,7 +217,7 @@
 - CONFIG: move min/max players to config file
 - ported to libcapsinetwork 0.2.0
 - API: moved newturn message to playerupdate attribute hasturn
-- remove Cards+Estates from Trades when owner changes (bankrupcy/trade/card usage)
+- remove Cards+Estates from Trades when owner changes (bankruptcy/trade/card usage)
 - API: allow for reconnect with .R
 - handle passing of estates elegantly
 - CONFIG: remove nexutil and nextrr with advancetonextof=groupname,
@@ -227,7 +227,7 @@
 ----------
 
 - if you are insolvent on third roll of the dice in jail it doesn't end the turn right
-- correctly move player to destination on succesful jail roll
+- correctly move player to destination on successful jail roll
 - allow players to go "back" (leaving a game)
 - valgrind fixes, including huge memory leak in escapeXML
 - free parking target for estates (cards/jail/taxes)
@@ -795,7 +795,7 @@
 2001-06-19 (cap)
 ----------
 
-- Changed game name into description (makes more sense) and issued seperate
+- Changed game name into description (makes more sense) and issued separate
   command for it (.gd) so the master can change the description.
 - Prepared some stuff for Chance/CC jailcards.
 
@@ -823,7 +823,7 @@
 ----------
 
 - Bugfix: double count must be reset after being sent to jail.
-- Added Player::solvent() function to seperate money checking from
+- Added Player::solvent() function to separate money checking from
   Player::pay()
 - B & O Railroad -> B & O Railroad. Change is currently in config file,
   I guess we should transform it ourselves before sending as XML?
@@ -999,7 +999,7 @@
 2001-04-28
 ----------
 
-- API decision: messages are seperated by newlines. Syntax within a message
+- API decision: messages are separated by newlines. Syntax within a message
   is yet unspecified, although it will probably use a subset of XML.
 - gamelist is printed in tiny XML.
 
@@ -1008,7 +1008,7 @@
 
 - turn-based game, .r only allowed on players turn [Milestone I bugfix]
 - complete redesign of user, game, player and ownership relations
-- seperate class for estate entities, names and prices from file
+- separate class for estate entities, names and prices from file
 - to_jail property for estates
 - buying properties and collecting rent are supported in the game, however
   there are no commands in the API yet to buy properties. unowned properties
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -388,7 +388,7 @@
 
 	if (!strstr(data, ":"))
 	{
-		pInput->ioError("Invalid input for .gc, no seperator after configId");
+		pInput->ioError("Invalid input for .gc, no separator after configId");
 		return;
 	}
 	int configId = atoi(strsep(&data, ":"));
@@ -907,12 +907,12 @@
 	m_auction = 0;
 }
 
-// Returns 0 on succesful bid, 1 on error.
+// Returns 0 on successful bid, 1 on error.
 int Game::bidInAuction(Player *pInput, char *data)
 {
 	if (!strstr(data, ":"))
 	{
-		pInput->ioError("Invalid input for .ab, no seperator after auctionId");
+		pInput->ioError("Invalid input for .ab, no separator after auctionId");
 		return 1;
 	}
 	int auctionId = atoi(strsep(&data, ":"));
@@ -1008,7 +1008,7 @@
 	// data looks like "1:1", tradeid, revision
 	if (!strstr(data, ":"))
 	{
-//		ioError("Invalid input for .Ta, no seperator after tradeId");
+//		ioError("Invalid input for .Ta, no separator after tradeId");
 //		return;
 		ignoreRevision = true; // backwards compatibility
 		tradeId = atoi(data);
@@ -1836,7 +1836,7 @@
 {
 	if (!card)
 	{
-		ioError(pTurn->name() + " should get a card, but there doesn't seem to be any available!");
+		ioError(pTurn->name() + " should get a card, but there don't seem to be any available!");
 		return true;
 	}
 	setDisplay(estate, false, false, "%s", card->getStringProperty("name").c_str());
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -725,14 +725,14 @@
 	// data looks like "1:10:1", tradeid, objectid, playerid
 	if (!strstr(data, ":"))
 	{
-		ioError("Invalid input, no seperator after tradeId");
+		ioError("Invalid input, no separator after tradeId");
 		return;
 	}
 	int tradeId = atoi(strsep(&data, ":"));
 
 	if (!strstr(data, ":"))
 	{
-		ioError("Invalid input, no seperator after objectId");
+		ioError("Invalid input, no separator after objectId");
 		return;
 	}
 	int objectId = atoi(strsep(&data, ":"));
@@ -776,7 +776,7 @@
 		Card *card = m_game->findCard(objectId);
 		if (!card || !card->owner())
 		{
-			ioError("Noone owns a card with cardId %d.", objectId);
+			ioError("No one owns a card with cardId %d.", objectId);
 			return;
 		}
 		object = card;
@@ -794,21 +794,21 @@
 	// data looks like "1:1:1:100", tradeid, playerfrom, playerto, money
 	if (!strstr(data, ":"))
 	{
-		ioError("Invalid input for .Tm, no seperator after tradeId");
+		ioError("Invalid input for .Tm, no separator after tradeId");
 		return;
 	}
 	int tradeId = atoi(strsep(&data, ":"));
 
 	if (!strstr(data, ":"))
 	{
-		ioError("Invalid input for .Tm, no seperator after playerFromId");
+		ioError("Invalid input for .Tm, no separator after playerFromId");
 		return;
 	}
 	int playerFromId = atoi(strsep(&data, ":"));
 
 	if (!strstr(data, ":"))
 	{
-		ioError("Invalid input for .Tm, no seperator after playerToId");
+		ioError("Invalid input for .Tm, no separator after playerToId");
 		return;
 	}
 
--- a/README.monopigator
+++ b/README.monopigator
@@ -9,7 +9,7 @@
 ---------------
 
 In order to make it easier to find people to play against, monopd can be run
-as dedicated game server and clients can request a list of available servers
+as a dedicated game server and clients can request a list of available servers
 on-line. This document describes the implementation of this technique and
 how to enable it in monopd.
 
@@ -37,7 +37,7 @@
 http://monopd.unixcode.org/register.php?host=monopd.mydomain.net&port=1234&version=0.2.1-CVS
 
 This keeps a server in the database for three minutes. So you'll have to
-register continously. Fortunately monopd can do this for you, but it does
+register continuously. Fortunately monopd can do this for you, but it does
 _not_ register by default. It will only register automatically when you
 enable it in the configuration.
 
--- a/TODO
+++ b/TODO
@@ -29,7 +29,7 @@
   - merge .Tc and .Te into .Tu
 - have auctions for estates when player goes bankrupt on bank
   - include estateId in bid command to avoid mistakes
-- allow for unmortgaging without 10% fee after transfer due to bankrupcy
+- allow for unmortgaging without 10% fee after transfer due to bankruptcy
 - wishlist: force default rules (for tournament servers)
 - API: password to join/watch games
 
--- a/conf/monopd.conf-dist
+++ b/conf/monopd.conf-dist
@@ -11,7 +11,7 @@
 # Frequency of monopigator registrations in seconds. The monopigator XML
 # database only returns severs who have registered during the past 300
 # seconds, so make this value smaller than 300 if you want your server to
-# appear continously. The minimum value is 60.
+# appear continuously. The minimum value is 60.
 #
 gatorfrequency=180
 
--- a/doc/api/gameboard
+++ b/doc/api/gameboard
@@ -1,5 +1,5 @@
 This document described the configuration syntax of monopd game configuration
-files. See the the actualy configuration files within games/ to see how
+files. See the actual configuration files within games/ to see how
 this syntax is applied.
 
 Configuration Groups
--- a/src/game.h
+++ b/src/game.h
@@ -117,7 +117,7 @@
 		void enforceDebt(Player *pBroke, Debt *debt = 0);
 		void newAuction(Player *pInput);
 		Auction *auction();
-		// Returns 0 on succesful bid, 1 on error.
+		// Returns 0 on successful bid, 1 on error.
 		int bidInAuction(Player *pInput, char *data);
 		void delAuction();
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-games-devel/attachments/20150305/f6844651/attachment.sig>


More information about the Pkg-games-devel mailing list