… | |
… | |
23 | cf::register_extcmd cfplus_support => sub { |
23 | cf::register_extcmd cfplus_support => sub { |
24 | my ($pl, $msg) = @_; |
24 | my ($pl, $msg) = @_; |
25 | |
25 | |
26 | # $msg->{version} |
26 | # $msg->{version} |
27 | |
27 | |
|
|
28 | ( |
28 | (version => 2) |
29 | version => 2, |
|
|
30 | ) |
29 | }; |
31 | }; |
30 | |
32 | |
31 | my %dialog; # currently active dialogs |
33 | my %dialog; # currently active dialogs |
32 | |
34 | |
33 | my $timer = Event->timer (interval => 0.2, parked => 1, data => cf::WF_AUTOCANCEL, cb => sub { |
35 | my $timer = Event->timer (interval => 0.2, parked => 1, data => cf::WF_AUTOCANCEL, cb => sub { |
… | |
… | |
149 | delete $dialog{$msg->{msgid}}; |
151 | delete $dialog{$msg->{msgid}}; |
150 | |
152 | |
151 | () |
153 | () |
152 | }; |
154 | }; |
153 | |
155 | |
154 | cf::attach_to_players |
156 | cf::player->attach ( |
155 | on_logout => sub { |
157 | on_logout => sub { |
156 | my ($pl) = @_; |
158 | my ($pl) = @_; |
157 | |
159 | |
158 | delete $dialog{$_} for grep $pl->ob == $dialog{$_}{ob}, keys %dialog; |
160 | delete $dialog{$_} for grep $pl->ob == $dialog{$_}{ob}, keys %dialog; |
159 | }, |
161 | }, |
160 | ; |
162 | ); |
161 | |
163 | |
162 | =item ... = extcmd editor_support |
164 | =item ... = extcmd editor_support |
163 | |
165 | |
164 | Returns the value required by clients that have an editor to download and |
166 | Returns the value required by clients that have an editor to download and |
165 | upload maps from/to the server. |
167 | upload maps from/to the server. |