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

Comparing deliantra/maps/perl/commands.ext (file contents):
Revision 1.13 by root, Sun Nov 26 02:37:53 2006 UTC vs.
Revision 1.14 by root, Mon Dec 11 02:41:26 2006 UTC

1#! perl 1#! perl
2
3use POSIX ();
2 4
3# miscellaneous commands 5# miscellaneous commands
4 6
5sub rename_to($$$) { 7sub rename_to($$$) {
6 my ($ob, $from, $to) = @_; 8 my ($ob, $from, $to) = @_;
105 } 107 }
106 108
107 1 109 1
108}; 110};
109 111
112cf::register_command uptime => 0, sub {
113 my ($ob, $arg) = @_;
114
115 my $startup = POSIX::strftime "%Y-%m-%d %H:%M:%S %Z", localtime $cf::UPTIME;
116 my $runtime = sprintf "%.1f", (time - $cf::UPTIME) / 86400;
117 $ob->reply (undef, "server started $startup, uptime ${runtime}\d");
118
119 1
120};
121

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines