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.75 by root, Thu Apr 8 17:36:53 2010 UTC vs.
Revision 1.76 by root, Mon Apr 12 05:22:37 2010 UTC

248 my ($ob, $arg) = @_; 248 my ($ob, $arg) = @_;
249 249
250 return $ob->reply (undef, sprintf "Output rate is presently %dbps.", $ob->contr->ns->max_rate / $cf::TICK) 250 return $ob->reply (undef, sprintf "Output rate is presently %dbps.", $ob->contr->ns->max_rate / $cf::TICK)
251 unless $arg > 0; 251 unless $arg > 0;
252 252
253 # minimum is 5k/s 253 $ob->contr->ns->max_rate ((cf::clamp $arg, $OUTPUT_RATE_MIN, $OUTPUT_RATE_MAX) * $TICK);
254 # maximum is 100k/s, this should be configurable
255 $ob->contr->ns->max_rate ((List::Util::max 5000, List::Util::min 100000, $arg) * $cf::TICK);
256 $ob->reply (undef, sprintf "Output rate now set to %dbps.", $ob->contr->ns->max_rate / $cf::TICK); 254 $ob->reply (undef, sprintf "Output rate now set to %dbps.", $ob->contr->ns->max_rate / $TICK);
257}; 255};
258 256
259cf::register_command 'output-count' => sub { 257cf::register_command 'output-count' => sub {
260 my ($ob, $arg) = @_; 258 my ($ob, $arg) = @_;
261 259

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines