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.38 by root, Sun Mar 18 03:05:40 2007 UTC vs.
Revision 1.39 by root, Mon Apr 2 19:56:11 2007 UTC

253 my ($ob, $arg) = @_; 253 my ($ob, $arg) = @_;
254 254
255 return $ob->reply (undef, sprintf "Output rate is presently %dbps.", $ob->contr->ns->max_rate / $cf::TICK) 255 return $ob->reply (undef, sprintf "Output rate is presently %dbps.", $ob->contr->ns->max_rate / $cf::TICK)
256 unless $arg > 0; 256 unless $arg > 0;
257 257
258 # minimum is 2k/s
258 $ob->contr->ns->max_rate ($arg * $cf::TICK); 259 $ob->contr->ns->max_rate ((List::Util::max 2048, $arg) * $cf::TICK);
259 $ob->reply (undef, sprintf "Output rate now set to %dbps.", $ob->contr->ns->max_rate / $cf::TICK); 260 $ob->reply (undef, sprintf "Output rate now set to %dbps.", $ob->contr->ns->max_rate / $cf::TICK);
260 261
261 1 262 1
262}; 263};
263 264

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines