--- deliantra/server/ext/commands.ext 2007/03/02 15:25:37 1.34 +++ deliantra/server/ext/commands.ext 2007/03/16 02:37:54 1.36 @@ -1,4 +1,4 @@ -#! perl +#! perl # MANDATORY use POSIX (); @@ -258,6 +258,18 @@ 1 }; + +cf::register_command 'output-rate' => sub { + my ($ob, $arg) = @_; + + return $ob->reply (undef, sprintf "Output rate is presently %dbps.", $ob->contr->ns->max_rate / $cf::TICK) + unless $arg > 0; + + $ob->contr->ns->max_rate ($arg * $cf::TICK); + $ob->reply (undef, sprintf "Output rate now set to %dbps.", $ob->contr->ns->max_rate / $cf::TICK); + + 1 +}; cf::register_command 'output-count' => sub { my ($ob, $arg) = @_;