Skip to content

Commit

Permalink
remove old server compability code
Browse files Browse the repository at this point in the history
the code that was previously outcommented was outcommented for 1.11.13
compability.

we shouldn't always allow "global_variable", "global_vaiable" falls into
the "dependent" category and should only be allowed if we have a
"from_side" attribute.
  • Loading branch information
gfgtdf committed Nov 17, 2014
1 parent 7651676 commit 2944051
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/server/game.cpp
Expand Up @@ -839,7 +839,7 @@ bool game::is_legal_command(const simple_wml::node& command, bool is_player) {
if (!command.one_child()) return false;
// Chatting is never an illegal command.
if (command.child("speak")) return true;
if (is_player && command.has_attr("dependent") /*&& command.has_attr("from_side")*/)
if (is_player && command.has_attr("dependent") && command.has_attr("from_side"))
//AKA it's generated by get_user_input for example [global_variable]
{
return true;
Expand All @@ -849,7 +849,6 @@ bool game::is_legal_command(const simple_wml::node& command, bool is_player) {
|| command.child("clear_labels")
|| command.child("rename")
|| command.child("countdown_update")
|| command.child("global_variable")
))
{
return true;
Expand Down

0 comments on commit 2944051

Please sign in to comment.