ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/commands.ext
(Generate patch)

Comparing deliantra/server/ext/commands.ext (file contents):
Revision 1.81 by root, Wed May 4 07:36:40 2011 UTC vs.
Revision 1.82 by root, Wed May 4 07:41:13 2011 UTC

396 my $startup = POSIX::strftime "%Y-%m-%d %H:%M:%S %Z", localtime $cf::UPTIME; 396 my $startup = POSIX::strftime "%Y-%m-%d %H:%M:%S %Z", localtime $cf::UPTIME;
397 my $runtime = sprintf "%.1f", (time - $cf::UPTIME) / 86400; 397 my $runtime = sprintf "%.1f", (time - $cf::UPTIME) / 86400;
398 $ob->send_msg ("c/uptime" => "server started $startup, uptime ${runtime}\d", cf::NDI_REPLY | cf::NDI_CLEAR); 398 $ob->send_msg ("c/uptime" => "server started $startup, uptime ${runtime}\d", cf::NDI_REPLY | cf::NDI_CLEAR);
399}; 399};
400 400
401my %IN_MEMORY = ( 401my %MAP_STATE = (
402 cf::MAP_ACTIVE => "A", 402 cf::MAP_ACTIVE => "A",
403 cf::MAP_INACTIVE => "I", 403 cf::MAP_INACTIVE => "I",
404 cf::MAP_SWAPPED => "S", 404 cf::MAP_SWAPPED => "S",
405); 405);
406 406
423 my $svd = int $cf::RUNTIME - $map->{last_save}; 423 my $svd = int $cf::RUNTIME - $map->{last_save};
424 $svd = "++" if $svd > 99; 424 $svd = "++" if $svd > 99;
425 425
426 $msg .= sprintf $format, 426 $msg .= sprintf $format,
427 (scalar $map->players), 427 (scalar $map->players),
428 $IN_MEMORY{$map->in_memory} || "?", 428 $MAP_STATE{$map->state} || "?",
429 $svd, 429 $svd,
430 (int $map->reset_at - $cf::RUNTIME), 430 (int $map->reset_at - $cf::RUNTIME),
431 $map->visible_name; 431 $map->visible_name;
432 } 432 }
433 433

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines