--- deliantra/server/ext/dm-support.ext 2007/11/14 08:09:46 1.16 +++ deliantra/server/ext/dm-support.ext 2008/12/16 23:25:24 1.20 @@ -31,7 +31,7 @@ ext::books::reload & ext::map_tags::reload & ext::map_world::reload & -print JSON::XS->new->pretty->encode({cf::mallinfo}) +\{cf::mallinfo}) EOF print $fh "\n> "; @@ -50,8 +50,8 @@ package cf; select $fh; - # compile first, the execute, as Coro does not support switching in eval string - my $cb = eval "sub { $cmd }"; + # compile first, then execute, as Coro does not support switching in eval string + my $cb = eval "sub { $cmd \n}"; my $t1 = Time::HiRes::time; my @res = $@ ? () : eval { $cb->() }; @@ -89,7 +89,7 @@ # now a shell listening on a tcp-port - let the firewall decide access rights if ($cf::CFG{perl_shell}) { - if (my $listen = new IO::Socket::INET LocalAddr => $cf::CFG{perl_shell}, Listen => 1, ReuseAddr => 1) { + if (my $listen = new IO::Socket::INET LocalAddr => $cf::CFG{perl_shell}, Listen => 1, ReuseAddr => 1, Blocking => 0) { $LISTENER = EV::io $listen, EV::READ, sub { tcp_serve $listen->accept }; } }