shogi-server source
Revisión | 79ebc61d6e600bb523a4cf426b42c7423bf0992c (tree) |
---|---|
Tiempo | 2004-06-29 00:56:56 |
Autor | nabeken <nabeken@b8c6...> |
Commiter | nabeken |
fixed "player nil" bug
@@ -808,13 +808,15 @@ def main | ||
808 | 808 | else |
809 | 809 | client.write_safe("LOGIN:incorrect" + eol) |
810 | 810 | client.write_safe("type 'LOGIN name password' or 'LOGIN name password x1'" + eol) if (str.split.length >= 4) |
811 | - client.close | |
812 | - Thread::kill(Thread::current) | |
813 | 811 | end |
814 | 812 | ensure |
815 | 813 | $mutex.unlock |
816 | 814 | end |
817 | 815 | end # login loop |
816 | + if (! player) | |
817 | + client.close | |
818 | + Thread::kill(Thread::current) | |
819 | + end | |
818 | 820 | log_message(sprintf("user %s login", player.name)) |
819 | 821 | player.run |
820 | 822 | begin |