OSDN Git Service

Fix #36230: Support Fischer Time Control
[shogi-server/shogi-server.git] / shogi_server / command.rb
index 5b25200..b3e5ca2 100644 (file)
@@ -499,7 +499,7 @@ module ShogiServer
     def call
       if (! Login::good_game_name?(@game_name))
         @player.write_safe(sprintf("##[ERROR] bad game name: %s.\n", @game_name))
-        if (/^(.+)-\d+-\d+$/ =~ @game_name)
+        if (/^(.+)-\d+-\d+F?$/ =~ @game_name)
           if Login::good_identifier?($1)
             # do nothing
           else
@@ -857,7 +857,7 @@ module ShogiServer
       byo_time   = nil
 
       if @source_game.split("+").size >= 2 &&
-         /^([^-]+)-(\d+)-(\d+)/ =~ @source_game.split("+")[1]
+         /^([^-]+)-(\d+)-(\d+F?)/ =~ @source_game.split("+")[1]
         name       = $1
         total_time = $2
         byo_time   = $3