… | |
… | |
159 | =item ... = extcmd editor_support |
159 | =item ... = extcmd editor_support |
160 | |
160 | |
161 | Returns the value required by clients that have an editor to download and |
161 | Returns the value required by clients that have an editor to download and |
162 | upload maps from/to the server. |
162 | upload maps from/to the server. |
163 | |
163 | |
|
|
164 | servertype => (game|test) type of this server |
|
|
165 | gameserver => the hostname:port of the normal game server |
|
|
166 | testserver => the hostname:port of the test server the maps can be tested on |
164 | cvs_root => the (http) url where the cvs root for downloading is located |
167 | cvs_root => the (http) url where the cvs root for downloading is located |
|
|
168 | lib_root => the (http) url where crossfire.0 and archetypes can be found |
165 | upload => the (http) url where clients can upload maps |
169 | upload => the (http) url where clients can upload maps |
166 | server => the hostname:port of the test server the maps can be tested on |
|
|
167 | |
170 | |
168 | If those values are not supplied or empty strings, the server does not |
171 | If those values are not supplied or empty strings, the server does not |
169 | support downloading, uploading, testing, respectively. |
172 | support downloading, uploading, testing, respectively. |
170 | |
173 | |
171 | The upload script expects the following values in a multipart form upload: |
174 | The upload script expects the following values in a multipart form upload: |
… | |
… | |
182 | =cut |
185 | =cut |
183 | |
186 | |
184 | cf::register_extcmd editor_support => sub { |
187 | cf::register_extcmd editor_support => sub { |
185 | my ($pl, $msg) = @_; |
188 | my ($pl, $msg) = @_; |
186 | |
189 | |
187 | ( |
190 | map +($_ => $cf::CFG{"editor_$_"}), qw(servertype gameserver testserver cvs_root lib_root) |
188 | cvs_root => $cf::CFG{editor_cvs_root}, |
|
|
189 | upload => $cf::CFG{editor_upload}, |
|
|
190 | server => $cf::CFG{editor_server}, |
|
|
191 | ) |
|
|
192 | }; |
191 | }; |
193 | |
192 | |
194 | sub unload { |
193 | sub unload { |
195 | while (my ($id, $dialog) = each %dialog) { |
194 | while (my ($id, $dialog) = each %dialog) { |
196 | $dialog->{ob}->contr->ext_reply ($id => msgtype => "error", msg => "npc dialogue module was reloaded"); |
195 | $dialog->{ob}->contr->ext_reply ($id => msgtype => "error", msg => "npc dialogue module was reloaded"); |