From: <mr...@us...> - 2007-12-19 11:20:20
|
Revision: 476 http://planeshift.svn.sourceforge.net/planeshift/?rev=476&view=rev Author: mr_dave Date: 2007-12-19 03:20:24 -0800 (Wed, 19 Dec 2007) Log Message: ----------- GM event register by range command consistency Modified Paths: -------------- trunk/data/help.xml trunk/docs/history.txt trunk/src/server/adminmanager.cpp Modified: trunk/data/help.xml =================================================================== --- trunk/data/help.xml 2007-12-19 06:49:40 UTC (rev 475) +++ trunk/data/help.xml 2007-12-19 11:20:24 UTC (rev 476) @@ -382,7 +382,7 @@ /event create [name] [description] To register all players in range, or a player by name, the GM should enter (note, [player] can be by name, or by target): -/event register [0-100 | player] +/event register [range 0-100 | player] The GM can remove a player from a current event by (note, [player] can be by name, or by target): /event remove [player] Modified: trunk/docs/history.txt =================================================================== --- trunk/docs/history.txt 2007-12-19 06:49:40 UTC (rev 475) +++ trunk/docs/history.txt 2007-12-19 11:20:24 UTC (rev 476) @@ -1,3 +1,8 @@ +*** 2007-12-19 by Dave Bentham +- To register players in range into an event now needs the word range in the + GM command: /event register [range <r> | <player>] + This is for consistency & clarity. + *** 2007-12-19 by Kenny Graunke - Clean up a bunch of fixed-length buffers and sprintf...use csString. - Added pssetup to trunk, with a few changes: Modified: trunk/src/server/adminmanager.cpp =================================================================== --- trunk/src/server/adminmanager.cpp 2007-12-19 06:49:40 UTC (rev 475) +++ trunk/src/server/adminmanager.cpp 2007-12-19 11:20:24 UTC (rev 476) @@ -669,16 +669,17 @@ } else if (subCmd == "register") { - /// 'register' expects either a numeric range value or a player name. - if (strspn(words[2].GetDataSafe(), "0123456789.") == words[2].Length()) + /// 'register' expects either 'range' numeric value or a player name. + if (words[2] == "range") { player.Empty(); - range = words.GetFloat(2); + range = words.GetFloat(3); + rangeSpecifier = IN_RANGE; } else { player = words[2]; - range = -1.0; + rangeSpecifier = INDIVIDUAL; } } else if (subCmd == "reward") @@ -5993,7 +5994,7 @@ // bit more vetting of the /event command - if in doubt, give help if ((data.subCmd == "create" && (data.gmeventName.Length() == 0 || data.gmeventDesc.Length() == 0)) || - (data.subCmd == "register" && data.player.Length() == 0 && data.range == NO_RANGE) || + (data.subCmd == "register" && data.player.Length() == 0 && data.rangeSpecifier == INDIVIDUAL) || (data.subCmd == "remove" && data.player.Length() == 0) || (data.subCmd == "reward" && data.item.Length() == 0 && data.stackCount == 0) || (data.subCmd == "control" && data.gmeventName.Length() == 0)) @@ -6006,7 +6007,7 @@ { psserver->SendSystemInfo( me->clientnum, "/event help\n" "/event create <name> <description>\n" - "/event register [<range> | <player>]\n" + "/event register [range <range> | <player>]\n" "/event reward [all | range <range> | <player>] # <item>\n" "/event remove <player>\n" "/event complete [name]\n" @@ -6026,7 +6027,7 @@ if (data.subCmd == "register") { /// this looks odd, because the range value is in the 'player' parameter. - if (data.range > 0) + if (data.rangeSpecifier == IN_RANGE) { gmeventResult = gmeventManager->RegisterPlayersInRangeInGMEvent(client, data.range); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |