shogi-server source
Revisão | a6cb7fddeb7af543c81366849090dbf7ceca4e73 (tree) |
---|---|
Hora | 2015-12-13 21:30:38 |
Autor | Daigo Moriwaki <daigo@debi...> |
Commiter | Daigo Moriwaki |
Merge branch 'wdoor-stable'
@@ -43,6 +43,12 @@ | ||
43 | 43 | http://www.sgtpepper.net/hyspro/diary/20150214.html. |
44 | 44 | - Added a companion R script: histogram.R |
45 | 45 | |
46 | +2015-02-01 Daigo Moriwaki <daigo at debian dot org> | |
47 | + | |
48 | + * [shogi-server] | |
49 | + - shogi_server/login.rb: When players are logged in, log their | |
50 | + player_id if they have it. | |
51 | + | |
46 | 52 | 2015-01-20 Daigo Moriwaki <daigo at debian dot org> |
47 | 53 | |
48 | 54 | * [mk_rate] |
@@ -109,7 +109,8 @@ class Login | ||
109 | 109 | |
110 | 110 | def process |
111 | 111 | @player.write_safe(sprintf("LOGIN:%s OK\n", @player.name)) |
112 | - log_message(sprintf("user %s run in %s mode", @player.name, @player.protocol)) | |
112 | + log_message("user %s run in %s mode" % [(@player.rated? ? @player.player_id : @player.name), | |
113 | + @player.protocol]) | |
113 | 114 | end |
114 | 115 | |
115 | 116 | def incorrect_duplicated_player(str) |
@@ -118,8 +118,9 @@ class TestFork < BaseClient | ||
118 | 118 | |
119 | 119 | result, result2 = handshake do |
120 | 120 | source_game = parse_game_name(@admin) |
121 | + sleep 0.2 | |
121 | 122 | @admin.puts "%%FORK #{source_game}" # nil for new_buoy_game name |
122 | - sleep 1 | |
123 | + sleep 1.2 | |
123 | 124 | assert /##\[FORK\]: new buoy game name: buoy_TestFork_1-1500-0/ =~ @admin.message |
124 | 125 | end |
125 | 126 |
@@ -190,7 +190,7 @@ class BaseClient < Test::Unit::TestCase | ||
190 | 190 | @p1.login |
191 | 191 | sleep 0.1 |
192 | 192 | @p2.login |
193 | - sleep 0.1 | |
193 | + sleep 0.5 | |
194 | 194 | @p1.game |
195 | 195 | sleep 0.1 |
196 | 196 | @p2.game |