OSDN Git Service

* [shogi-server] - shogi-server: any bind addresses, ruby attempts to listen on both...
[shogi-server/shogi-server.git] / shogi-server
index d79f165..c20dba8 100755 (executable)
@@ -6,7 +6,7 @@
 #
 #--
 # Copyright (C) 2004 NABEYA Kenichi (aka nanami@2ch)
 #
 #--
 # Copyright (C) 2004 NABEYA Kenichi (aka nanami@2ch)
-# Copyright (C) 2007-2008 Daigo Moriwaki (daigo at debian dot org)
+# Copyright (C) 2007-2012 Daigo Moriwaki (daigo at debian dot org)
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ $topdir = nil
 $league = nil
 $logger = nil
 $config = nil
 $league = nil
 $logger = nil
 $config = nil
-$:.unshift File.dirname(__FILE__)
+$:.unshift(File.dirname(File.expand_path(__FILE__)))
 require 'shogi_server'
 require 'shogi_server/config'
 require 'shogi_server/util'
 require 'shogi_server'
 require 'shogi_server/config'
 require 'shogi_server/util'
@@ -143,9 +143,6 @@ LICENSE
 
 SEE ALSO
 
 
 SEE ALSO
 
-RELEASE
-        #{ShogiServer::Release}
-
 REVISION
         #{ShogiServer::Revision}
 
 REVISION
         #{ShogiServer::Revision}
 
@@ -375,6 +372,7 @@ def main
   $league.dir = $topdir
 
   config = {}
   $league.dir = $topdir
 
   config = {}
+  config[:BindAddress] = "0.0.0.0"
   config[:Port]       = port
   config[:ServerType] = WEBrick::Daemon if $options["daemon"]
   config[:Logger]     = $logger
   config[:Port]       = port
   config[:ServerType] = WEBrick::Daemon if $options["daemon"]
   config[:Logger]     = $logger