--- deliantra/server/ext/dm-support.ext 2007/04/18 14:24:09 1.5 +++ deliantra/server/ext/dm-support.ext 2007/09/20 12:30:28 1.11 @@ -1,5 +1,6 @@ #! perl +use Coro::Debug; use IO::Socket; use Storable qw/nfreeze thaw/; @@ -24,10 +25,14 @@ Useful commands (note the '&'): reload_perl & +reload_config & reload_regions & reload_facedata & reload_treasures & reload_archetypes & +ext::help::reload & +ext::books::reload & +ext::map_tags::reload & ext::map_world::reload & EOF print "\n> "; @@ -38,6 +43,8 @@ if ($cmd =~ /^\s*exit\b/i) { print "will not exit() server.\n"; + } elsif ($cmd =~ s/^coro\s+// or $cmd =~ /^(?:ps|bt\s)/) { + Coro::Debug::command $cmd; } else { my $sub = sub { package cf; @@ -60,7 +67,10 @@ }; if ($cmd =~ s/\s*&$//) { - Coro::async_pool { $sub->() }; + cf::async { + $Coro::current->desc ($cmd); + $sub->() + }; } else { $sub->(); } @@ -79,3 +89,5 @@ Event->io (fd => $listen, poll => 'r', data => cf::WF_AUTOCANCEL, cb => sub { tcp_serve $listen->accept }); } } + +