… | |
… | |
145 | my $observe = $ob->contr->observe; |
145 | my $observe = $ob->contr->observe; |
146 | |
146 | |
147 | my $map = $observe->map |
147 | my $map = $observe->map |
148 | or return; |
148 | or return; |
149 | |
149 | |
|
|
150 | my $msg = ''; |
|
|
151 | |
|
|
152 | if ($map->name ne '') { |
|
|
153 | $msg .= sprintf "%s [%s] ", $map->name, $map->visible_name |
|
|
154 | } else { |
|
|
155 | $msg .= sprintf "%s ", $map->visible_name |
|
|
156 | } |
|
|
157 | |
|
|
158 | if ($map->visible_name ne $map->path) { |
|
|
159 | $msg .= sprintf "(%s) ", $map->path; |
|
|
160 | } |
|
|
161 | |
150 | my $msg = sprintf "%s (%s)\r%s", $map->name, $map->path, $observe->region->longname; |
162 | $msg .= sprintf "\r%s", $observe->region->longname; |
151 | $msg .= sprintf "\rplayers: %d difficulty: %d size: %d start: %dx%d timeout: %d", |
163 | |
152 | (scalar $map->players), $map->difficulty, $map->width, $map->height, $map->enter_x, $map->enter_y, $map->timeout |
164 | $msg .= sprintf "\rplayers: %d difficulty: %d" |
|
|
165 | . "\rsize: %dx%d start: %dx%d position: (%d|%d) timeout: %d", |
|
|
166 | (scalar $map->players), |
|
|
167 | $map->difficulty, |
|
|
168 | $map->width, $map->height, |
|
|
169 | $map->enter_x, $map->enter_y, |
|
|
170 | $ob->x, $ob->y, |
|
|
171 | $map->timeout |
153 | if $ob->flag (cf::FLAG_WIZ); |
172 | if $ob->flag (cf::FLAG_WIZ); |
154 | |
173 | |
155 | $ob->send_msg ("c/mapinfo" => $msg, cf::NDI_REPLY | cf::NDI_CLEAR); |
174 | $ob->send_msg ("c/mapinfo" => $msg, cf::NDI_REPLY | cf::NDI_CLEAR); |
156 | }; |
175 | }; |
157 | |
176 | |