OSDN Git Service

- shogi_server/command.rb: For an unknown error command log, an empty line is no...
[shogi-server/shogi-server.git] / shogi_server / command.rb
index 571a18d..daf501f 100644 (file)
@@ -374,10 +374,17 @@ module ShogiServer
     end
   end
 
-  class Monitor2OffCommand < MonitorOffCommand # same
+  class Monitor2OffCommand < MonitorOffCommand
     def initialize(str, player, game)
       super
     end
+
+    def call
+      if (@game)
+        @game.monitoroff(MonitorHandler2.new(@player))
+      end
+      return :continue
+    end
   end
 
   # Command of HELP
@@ -686,7 +693,7 @@ module ShogiServer
     end
 
     def call
-      msg = "##[ERROR] unknown command %s\n" % [@str]
+      msg = "##[ERROR] unknown command %s\n" % [@str.chomp]
       @player.write_safe(msg)
       log_error(msg)
       return :continue