ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/lib/cf.pm
(Generate patch)

Comparing deliantra/server/lib/cf.pm (file contents):
Revision 1.106 by root, Sun Dec 31 17:29:22 2006 UTC vs.
Revision 1.107 by root, Sun Dec 31 18:10:40 2006 UTC

1281} 1281}
1282 1282
1283############################################################################# 1283#############################################################################
1284# initialisation 1284# initialisation
1285 1285
1286sub _perl_reload() { 1286sub perl_reload() {
1287 # can/must only be called in main 1287 # can/must only be called in main
1288 if ($Coro::current != $Coro::main) { 1288 if ($Coro::current != $Coro::main) {
1289 warn "can only reload from main coroutine\n"; 1289 warn "can only reload from main coroutine\n";
1290 return; 1290 return;
1291 } 1291 }
1373 } 1373 }
1374 1374
1375 warn "reloaded successfully"; 1375 warn "reloaded successfully";
1376}; 1376};
1377 1377
1378sub perl_reload() {
1379 _perl_reload;
1380}
1381
1382register "<global>", __PACKAGE__; 1378register "<global>", __PACKAGE__;
1383 1379
1384register_command "perl-reload" => sub { 1380register_command "perl-reload" => sub {
1385 my ($who, $arg) = @_; 1381 my ($who, $arg) = @_;
1386 1382
1387 if ($who->flag (FLAG_WIZ)) { 1383 if ($who->flag (FLAG_WIZ)) {
1388 $who->message ("reloading..."); 1384 $who->message ("start of reload.");
1389 _perl_reload; 1385 perl_reload;
1386 $who->message ("end of reload.");
1390 } 1387 }
1391}; 1388};
1392 1389
1393unshift @INC, $LIBDIR; 1390unshift @INC, $LIBDIR;
1394 1391

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines