… | |
… | |
3276 | if @{ $self->{query_queue} } == 1; |
3276 | if @{ $self->{query_queue} } == 1; |
3277 | |
3277 | |
3278 | 1 |
3278 | 1 |
3279 | } |
3279 | } |
3280 | |
3280 | |
|
|
3281 | =item $client->update_command_faces |
|
|
3282 | |
|
|
3283 | =cut |
|
|
3284 | |
|
|
3285 | our @COMMAND_FACES; # [normal commands, emotes, dm commands] |
|
|
3286 | |
|
|
3287 | sub cf::client::update_command_faces { |
|
|
3288 | my ($self) = @_; |
|
|
3289 | |
|
|
3290 | my @faces = ( |
|
|
3291 | $COMMAND_FACES[0], |
|
|
3292 | $COMMAND_FACES[1], |
|
|
3293 | $self->pl->ob->flag (cf::FLAG_WIZ) ? $COMMAND_FACES[2] : () |
|
|
3294 | ); |
|
|
3295 | |
|
|
3296 | $self->send_face ($_) |
|
|
3297 | for @faces; |
|
|
3298 | $self->flush_fx; |
|
|
3299 | |
|
|
3300 | $self->ext_msg (command_list => @faces); |
|
|
3301 | } |
|
|
3302 | |
|
|
3303 | =item cf::client::set_command_faces $normal_commands, $emotes, $dm_commands |
|
|
3304 | |
|
|
3305 | =cut |
|
|
3306 | |
|
|
3307 | sub cf::client::set_command_faces { |
|
|
3308 | @COMMAND_FACES = @_; |
|
|
3309 | } |
|
|
3310 | |
3281 | cf::client->attach ( |
3311 | cf::client->attach ( |
3282 | on_connect => sub { |
3312 | on_connect => sub { |
3283 | my ($ns) = @_; |
3313 | my ($ns) = @_; |
3284 | |
3314 | |
3285 | $ns->{json_coder} = JSON::XS->new->utf8->max_size (1e6)->convert_blessed; |
3315 | $ns->{json_coder} = JSON::XS->new->utf8->max_size (1e6)->convert_blessed; |