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.59 by root, Fri Aug 10 05:27:38 2007 UTC vs.
Revision 1.60 by root, Fri Aug 10 05:38:16 2007 UTC

47cf::register_command who => sub { 47cf::register_command who => sub {
48 my ($ob, $arg) = @_; 48 my ($ob, $arg) = @_;
49 49
50 $ob->speed_left ($ob->speed_left - 4); 50 $ob->speed_left ($ob->speed_left - 4);
51 51
52 $ob->contr->ns->send_msg (log => (join "\n\n", who_listing $ob->may ("extended_who"), $arg), cf::NDI_DK_ORANGE); 52 $ob->send_msg (log => (join "\n\n", who_listing $ob->may ("extended_who"), $arg), cf::NDI_DK_ORANGE | cf::NDI_REPLY);
53}; 53};
54 54
55cf::register_command seen => sub { 55cf::register_command seen => sub {
56 my ($pl, $args) = @_; 56 my ($pl, $args) = @_;
57 57
145 145
146 my $observe = $ob->contr->observe; 146 my $observe = $ob->contr->observe;
147 147
148 my $map = $observe->map 148 my $map = $observe->map
149 or return; 149 or return;
150
150 $ob->reply (undef, (sprintf "%s (%s) %s", $map->name, $map->path, $observe->region->longname)); 151 my $msg = sprintf "%s (%s) %s", $map->name, $map->path, $observe->region->longname;
151 $ob->reply (undef, (sprintf "players: %d difficulty: %d size: %d start: %dx%d timeout: %d", 152 $msg .= sprintf "\n\nplayers: %d difficulty: %d size: %d start: %dx%d timeout: %d",
152 (scalar $map->players), $map->difficulty, $map->width, $map->height, $map->enter_x, $map->enter_y, $map->timeout)) 153 (scalar $map->players), $map->difficulty, $map->width, $map->height, $map->enter_x, $map->enter_y, $map->timeout
153 if $ob->flag (cf::FLAG_WIZ); 154 if $ob->flag (cf::FLAG_WIZ);
154 $ob->reply (undef, $map->msg); 155 $ob->send_msg (log => $msg, cf::NDI_REPLY);
155}; 156};
156 157
157cf::register_command whereami => sub { 158cf::register_command whereami => sub {
158 my ($ob) = @_; 159 my ($ob) = @_;
159 160
171 } 172 }
172 173
173 my $msg = "In the world currently there are:\n\n" 174 my $msg = "In the world currently there are:\n\n"
174 . join "", map "$count{$_} player(s) in $_\n\n", sort keys %count; 175 . join "", map "$count{$_} player(s) in $_\n\n", sort keys %count;
175 176
176 $ob->contr->ns->send_msg (log => $msg, cf::NDI_REPLY); 177 $ob->send_msg (log => $msg, cf::NDI_REPLY);
177}; 178};
178 179
179cf::register_command hiscore => sub { 180cf::register_command hiscore => sub {
180 my ($ob, $arg) = @_; 181 my ($ob, $arg) = @_;
181 182
182 my $url = $cf::CFG->{hiscore_url}; 183 my $url = $cf::CFG->{hiscore_url};
183 $ob->contr->ns->send_msg (log => "See $url", cf::NDI_REPLY); 184 $ob->send_msg (log => "See $url", cf::NDI_REPLY);
184}; 185};
185 186
186sub _set_mode($$$@) { 187sub _set_mode($$$@) {
187 my ($name, $ob, $arg, $slot, @choices) = @_; 188 my ($name, $ob, $arg, $slot, @choices) = @_;
188 189

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines