… | |
… | |
154 | |
154 | |
155 | delete $dialog{$_} for grep $pl->ob == $dialog{$_}{ob}, keys %dialog; |
155 | delete $dialog{$_} for grep $pl->ob == $dialog{$_}{ob}, keys %dialog; |
156 | }, |
156 | }, |
157 | ; |
157 | ; |
158 | |
158 | |
|
|
159 | =item ... = extcmd editor_support |
|
|
160 | |
|
|
161 | Returns the value required by clients that have an editor to download and |
|
|
162 | upload maps from/to the server. |
|
|
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 |
|
|
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 |
|
|
169 | upload => the (http) url where clients can upload maps |
|
|
170 | |
|
|
171 | If those values are not supplied or empty strings, the server does not |
|
|
172 | support downloading, uploading, testing, respectively. |
|
|
173 | |
|
|
174 | The upload script expects the following values in a multipart form upload: |
|
|
175 | |
|
|
176 | client: a descriptive string describing the editor and version used to upload |
|
|
177 | path: absolute server-side map path beginning with / |
|
|
178 | map: the map file itself |
|
|
179 | mapdir: the cvs root url originally used to download the map |
|
|
180 | revision: cvs-revision originally used to download the map |
|
|
181 | comment: a comment supplied by the user that documents the changes |
|
|
182 | cf_login: crossfire server login |
|
|
183 | cf_password: crossfire server password, optionally used for authentication purposes |
|
|
184 | |
|
|
185 | =cut |
|
|
186 | |
159 | cf::register_extcmd editor_support => sub { |
187 | cf::register_extcmd editor_support => sub { |
160 | my ($pl, $msg) = @_; |
188 | my ($pl, $msg) = @_; |
161 | |
189 | |
162 | ( |
190 | map +($_ => $cf::CFG{"editor_$_"}), qw(servertype gameserver testserver cvs_root lib_root builder_ui) |
163 | cvs_root => $cf::CFG{editor_cvs_root}, |
|
|
164 | upload => $cf::CFG{editor_upload}, |
|
|
165 | ) |
|
|
166 | }; |
191 | }; |
167 | |
192 | |
168 | sub unload { |
193 | sub unload { |
169 | while (my ($id, $dialog) = each %dialog) { |
194 | while (my ($id, $dialog) = each %dialog) { |
170 | $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"); |