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.34 by pippijn, Fri Mar 2 15:25:37 2007 UTC vs.
Revision 1.35 by root, Wed Mar 14 15:44:47 2007 UTC

1#! perl 1#! perl # MANDATORY
2 2
3use POSIX (); 3use POSIX ();
4 4
5# miscellaneous commands 5# miscellaneous commands
6 6
257 $ob->reply (undef, $ob->contr->braced ? "You are braced." : "Not braced."); 257 $ob->reply (undef, $ob->contr->braced ? "You are braced." : "Not braced.");
258 258
259 1 259 1
260}; 260};
261 261
262cf::register_command 'output-rate' => sub {
263 my ($ob, $arg) = @_;
264
265 return $ob->reply (undef, sprintf "Output rate is presently %dbps.", $ob->contr->ns->max_rate / $cf::TICK)
266 unless $arg > 0;
267
268 $ob->contr->ns->max_rate ($arg * $cf::TICK);
269 $ob->reply (undef, sprintf "Output rate now set to%dbps.", $ob->contr->ns->max_rate / $cf::TICK);
270
271 1
272};
273
262cf::register_command 'output-count' => sub { 274cf::register_command 'output-count' => sub {
263 my ($ob, $arg) = @_; 275 my ($ob, $arg) = @_;
264 276
265 return $ob->reply (undef, "Output count is presently " . $ob->contr->outputs_count) 277 return $ob->reply (undef, "Output count is presently " . $ob->contr->outputs_count)
266 unless $arg > 0; 278 unless $arg > 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines