From eb0680c99f033ca3acc8412225eb7b0f823cd824 Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman <jeffrey.freeman@syncleus.com> Date: Wed, 24 Feb 2021 22:04:45 -0500 Subject: [PATCH] Fixed set input handlers parsing order to capture all set types. --- lib/aethyr/core/input_handlers/set.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/aethyr/core/input_handlers/set.rb b/lib/aethyr/core/input_handlers/set.rb index f4d125a..d1095ea 100644 --- a/lib/aethyr/core/input_handlers/set.rb +++ b/lib/aethyr/core/input_handlers/set.rb @@ -55,16 +55,16 @@ EOF $manager.submit_action(Aethyr::Core::Actions::Setcolor::SetcolorCommand.new(@player, {:option => option})) when /^set\s+colors?.*/i $manager.submit_action(Aethyr::Core::Actions::Showcolors::ShowcolorsCommand.new(@player, {})) - when /^set\s+(\w+)\s*(.*)$/i - setting = $1.strip - value = $2.strip if $2 - $manager.submit_action(Aethyr::Core::Actions::Set::SetCommand.new(@player, {:setting => setting, :value => value})) when /^set\s+colors?\s+(\w+)\s+(.+)$/i option = $1 color = $2 $manager.submit_action(Aethyr::Core::Actions::Setcolor::SetcolorCommand.new(@player, {:option => option, :color => color})) when /^set\s+password$/i $manager.submit_action(Aethyr::Core::Actions::Setpassword::SetpasswordCommand.new(@player, {})) + when /^set\s+(\w+)\s*(.*)$/i + setting = $1.strip + value = $2.strip if $2 + $manager.submit_action(Aethyr::Core::Actions::Set::SetCommand.new(@player, {:setting => setting, :value => value})) end end -- GitLab