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.10 by root, Mon Jan 1 17:50:26 2007 UTC vs.
Revision 1.11 by root, Tue Jan 2 19:18:33 2007 UTC

136 136
137 no re 'eval'; $arg = qr<$arg>; 137 no re 'eval'; $arg = qr<$arg>;
138 138
139 my $format = "%2s %1s %3s %5s %-60.60s\n"; 139 my $format = "%2s %1s %3s %5s %-60.60s\n";
140 140
141 my $msg = sprintf $format, "Pl", "I", "Svd", "Reset", "Name"; 141 $ob->reply (undef, sprintf $format, "Pl", "I", "Svd", "Reset", "Name");
142 142
143 for (sort keys %cf::MAP) { 143 for (sort keys %cf::MAP) {
144 my $map = $cf::MAP{$_} 144 my $map = $cf::MAP{$_}
145 or next; 145 or next;
146 146
147 next unless $map->path =~ $arg; 147 next unless $map->path =~ $arg;
148 148
149 my $svd = int $cf::RUNTIME - $map->{last_save}; 149 my $svd = int $cf::RUNTIME - $map->{last_save};
150 $svd = "++" if $svd > 99; 150 $svd = "++" if $svd > 99;
151 151
152 $msg .= sprintf $format, 152 $ob->reply (undef, sprintf $format,
153 (scalar $map->players), 153 (scalar $map->players),
154 $IN_MEMORY{$map->in_memory} || "?", 154 $IN_MEMORY{$map->in_memory} || "?",
155 $svd, 155 $svd,
156 (int $map->reset_at - $cf::RUNTIME), 156 (int $map->reset_at - $cf::RUNTIME),
157 $map->{path}->visible_name; 157 $map->{path}->visible_name);
158 } 158 }
159
160 $ob->reply (undef, $msg);
161 159
162 1 160 1
163}; 161};
164 162

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines