Author: soliton
Date: Fri May 29 00:41:53 2009
New Revision: 35924
URL: http://svn.gna.org/viewcvs/wesnoth?rev=35924&view=rev
Log:
if the host is an observer still allow him to do some commands
Modified:
branches/1.6/src/server/game.cpp
Modified: branches/1.6/src/server/game.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/branches/1.6/src/server/game.cpp?rev=35924&r1=35923&r2=35924&view=diff
==============================================================================
--- branches/1.6/src/server/game.cpp (original)
+++ branches/1.6/src/server/game.cpp Fri May 29 00:41:53 2009
@@ -734,9 +734,10 @@
std::vector<int> marked;
const simple_wml::node::child_list& commands =
turn->children("command");
simple_wml::node::child_list::const_iterator command;
+ const bool player = (is_player(user->first) || user->first == owner_);
for (command = commands.begin(); command != commands.end(); ++command) {
if (!is_current_player(user->first)
- && !is_legal_command(**command, is_player(user->first))) {
+ && !is_legal_command(**command, player)) {
LOG_GAME << "ILLEGAL COMMAND: (((" << data.output() <<
")))\n";
std::stringstream msg;
msg << "Removing illegal command from: " <<
user->second.name()
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits