OSDN Git Service

Merge branch 'wdoor-stable' 201604-Fischer
authorDaigo Moriwaki <daigo@debian.org>
Sun, 13 Dec 2015 12:30:38 +0000 (21:30 +0900)
committerDaigo Moriwaki <daigo@debian.org>
Sun, 13 Dec 2015 12:30:38 +0000 (21:30 +0900)
changelog
shogi_server/login.rb
test/TC_fork.rb
test/baseclient.rb

index 5066685..e448a2a 100644 (file)
--- a/changelog
+++ b/changelog
            http://www.sgtpepper.net/hyspro/diary/20150214.html.
          - Added a companion R script: histogram.R 
 
+2015-02-01  Daigo Moriwaki <daigo at debian dot org>
+
+       * [shogi-server]
+         - shogi_server/login.rb: When players are logged in, log their
+           player_id if they have it.
+
 2015-01-20  Daigo Moriwaki <daigo at debian dot org>
 
        * [mk_rate]
index 79e770e..8255a1e 100644 (file)
@@ -109,7 +109,8 @@ class Login
 
   def process
     @player.write_safe(sprintf("LOGIN:%s OK\n", @player.name))
-    log_message(sprintf("user %s run in %s mode", @player.name, @player.protocol))
+    log_message("user %s run in %s mode" % [(@player.rated? ? @player.player_id : @player.name),
+                                            @player.protocol])
   end
 
   def incorrect_duplicated_player(str)
index cfdf9e1..6079802 100644 (file)
@@ -118,8 +118,9 @@ class TestFork < BaseClient
 
     result, result2 = handshake do
       source_game = parse_game_name(@admin)
+      sleep 0.2
       @admin.puts "%%FORK #{source_game}" # nil for new_buoy_game name
-      sleep 1
+      sleep 1.2
       assert /##\[FORK\]: new buoy game name: buoy_TestFork_1-1500-0/ =~ @admin.message
     end
 
index 5be03b9..f6d7487 100644 (file)
@@ -190,7 +190,7 @@ class BaseClient < Test::Unit::TestCase
     @p1.login
     sleep 0.1
     @p2.login
-    sleep 0.1
+    sleep 0.5
     @p1.game
     sleep 0.1
     @p2.game