… | |
… | |
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 | |
|
|
92 | cf::register_command mapinfo => sub { |
|
|
93 | my ($ob) = @_; |
|
|
94 | |
|
|
95 | my $map = $ob->map |
|
|
96 | or return; |
|
|
97 | $ob->reply (undef, (sprintf "%s (%s) %s", $map->name, $map->path, $ob->region->longname)); |
|
|
98 | $ob->reply (undef, (sprintf "players: %d difficulty: %d size: %d start: %dx%d timeout: %d", |
|
|
99 | $map->players, $map->difficulty, $map->width, $map->height, $map->enter_x, $map->enter_y, $map->timeout)) |
|
|
100 | if $ob->flag (cf::FLAG_WIZ); |
|
|
101 | $ob->reply (undef, $map->msg); |
|
|
102 | |
|
|
103 | 1 |
|
|
104 | }; |
|
|
105 | |
|
|
106 | cf::register_command whereami => sub { |
|
|
107 | my ($ob) = @_; |
|
|
108 | |
|
|
109 | my $reg = $ob->region; |
|
|
110 | $ob->reply (undef, (sprintf "You are %s.\n%s", $reg->longname, $reg->msg)); |
|
|
111 | |
|
|
112 | 1 |
|
|
113 | }; |
|
|
114 | |
92 | cf::register_command applymode => sub { |
115 | cf::register_command applymode => sub { |
93 | my ($ob, $arg) = @_; |
116 | my ($ob, $arg) = @_; |
94 | my @types = ("nochoice", "never", "always"); |
117 | my @types = ("nochoice", "never", "always"); |
95 | my $mapping = { |
118 | my $mapping = { |
96 | nochoice => 1, |
119 | nochoice => 1, |