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.23 by pippijn, Fri Mar 2 10:54:59 2007 UTC vs.
Revision 1.25 by pippijn, Fri Mar 2 11:13:50 2007 UTC

87 $ob->reply (undef, (join "\n", who_listing $ob->may ("extended_who")), cf::NDI_UNIQUE | cf::NDI_DK_ORANGE); 87 $ob->reply (undef, (join "\n", who_listing $ob->may ("extended_who")), cf::NDI_UNIQUE | cf::NDI_DK_ORANGE);
88 88
89 1 89 1
90}; 90};
91 91
92cf::register_command whereami => sub {
93 my ($ob) = @_;
94
95 my $reg = $ob->region;
96 $ob->reply (undef, (sprintf "You are %s.\n%s", $reg->longname, $reg->msg));
97
98 1
99};
100
92cf::register_command applymode => sub { 101cf::register_command applymode => sub {
93 my ($ob, $arg) = @_; 102 my ($ob, $arg) = @_;
94 my @types = ("nochoice", "never", "always"); 103 my @types = ("nochoice", "never", "always");
95 my $mapping = { 104 my $mapping = {
96 nochoice => 1, 105 nochoice => 1,
190 $ob->reply (undef, $ob->contr->braced ? "You are braced." : "Not braced."); 199 $ob->reply (undef, $ob->contr->braced ? "You are braced." : "Not braced.");
191 200
192 1 201 1
193}; 202};
194 203
204cf::register_command 'output-count' => sub {
205 my ($ob, $arg) = @_;
206
207 return $ob->reply (undef, "Output count is presently " . $ob->contr->outputs_count)
208 unless $arg > 0;
209
210 $ob->contr->outputs_count ($arg);
211 $ob->reply (undef, "Output count now set to " . $ob->contr->outputs_count);
212
213 1
214};
215
216cf::register_command 'output-sync' => sub {
217 my ($ob, $arg) = @_;
218
219 return $ob->reply (undef, "Output sync time is presently " . $ob->contr->outputs_sync)
220 unless $arg > 0;
221
222 $ob->contr->outputs_sync ($arg);
223 $ob->reply (undef, "Output sync time now set to " . $ob->contr->outputs_sync);
224
225 1
226};
227
195# XXX: This has a bug. After one sets his wimpy level to 0 and resets it to 228# XXX: This has a bug. After one sets his wimpy level to 0 and resets it to
196# some other level (which may also be 0), this does not get echoed, 229# some other level (which may also be 0), this does not get echoed,
197# but it does get set. 230# but it does get set.
198cf::register_command wimpy => sub { 231cf::register_command wimpy => sub {
199 my ($ob, $arg) = @_; 232 my ($ob, $arg) = @_;
221 #$ob->contr->peaceful ($ob->contr->peaceful ? 0 : 1); 254 #$ob->contr->peaceful ($ob->contr->peaceful ? 0 : 1);
222 #$ob->reply (undef, $ob->contr->peaceful ? "You will attack other players." : "You will not attack other players."); 255 #$ob->reply (undef, $ob->contr->peaceful ? "You will attack other players." : "You will not attack other players.");
223 256
224 1 257 1
225}; 258};
226
227 259
228cf::register_command rename => sub { 260cf::register_command rename => sub {
229 my ($ob, $arg) = @_; 261 my ($ob, $arg) = @_;
230 262
231 $ob->speed_left ($ob->speed_left - 0.25); 263 $ob->speed_left ($ob->speed_left - 0.25);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines