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.14 by root, Mon Dec 11 02:41:26 2006 UTC vs.
Revision 1.15 by root, Tue Dec 12 16:59:34 2006 UTC

75 ), 75 ),
76 eval { "* IRC: " . join ", ", ext::schmorp_irc::users }, 76 eval { "* IRC: " . join ", ", ext::schmorp_irc::users },
77 ) 77 )
78} 78}
79 79
80cf::register_command who => $cf::TICK, sub { 80cf::register_command who => sub {
81 my ($ob, $arg) = @_; 81 my ($ob, $arg) = @_;
82
83 $ob->speed_left ($ob->speed_left - 0.25);
82 84
83 $ob->reply (undef, (join "\n", who_listing $ob->may ("extended_who")), cf::NDI_UNIQUE | cf::NDI_DK_ORANGE); 85 $ob->reply (undef, (join "\n", who_listing $ob->may ("extended_who")), cf::NDI_UNIQUE | cf::NDI_DK_ORANGE);
84 86
85 1 87 1
86}; 88};
87 89
88cf::register_command rename => $cf::TICK, sub { 90cf::register_command rename => sub {
89 my ($ob, $arg) = @_; 91 my ($ob, $arg) = @_;
92
93 $ob->speed_left ($ob->speed_left - 0.25);
90 94
91 if ($arg =~ /^\s* (?: <([^>]+)> \s+)? to \s+ <([^>]*)> \s*$/x) { 95 if ($arg =~ /^\s* (?: <([^>]+)> \s+)? to \s+ <([^>]*)> \s*$/x) {
92 # compatibility syntax 96 # compatibility syntax
93 rename_to $ob, $1, $2; 97 rename_to $ob, $1, $2;
94 } elsif ($arg =~ / 98 } elsif ($arg =~ /
107 } 111 }
108 112
109 1 113 1
110}; 114};
111 115
112cf::register_command uptime => 0, sub { 116cf::register_command uptime => sub {
113 my ($ob, $arg) = @_; 117 my ($ob, $arg) = @_;
114 118
115 my $startup = POSIX::strftime "%Y-%m-%d %H:%M:%S %Z", localtime $cf::UPTIME; 119 my $startup = POSIX::strftime "%Y-%m-%d %H:%M:%S %Z", localtime $cf::UPTIME;
116 my $runtime = sprintf "%.1f", (time - $cf::UPTIME) / 86400; 120 my $runtime = sprintf "%.1f", (time - $cf::UPTIME) / 86400;
117 $ob->reply (undef, "server started $startup, uptime ${runtime}\d"); 121 $ob->reply (undef, "server started $startup, uptime ${runtime}\d");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines