Author: soliton
Date: Fri May 29 00:43:16 2009
New Revision: 35927

URL: http://svn.gna.org/viewcvs/wesnoth?rev=35927&view=rev
Log:
if the host is an observer still allow him to do some commands

Modified:
    trunk/src/server/game.cpp

Modified: trunk/src/server/game.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/server/game.cpp?rev=35927&r1=35926&r2=35927&view=diff
==============================================================================
--- trunk/src/server/game.cpp (original)
+++ trunk/src/server/game.cpp Fri May 29 00:43:16 2009
@@ -765,9 +765,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

Reply via email to