… | |
… | |
15 | my $is_jx = $client =~ /^JCrossclient 1.0 alpha-(\d+)/ |
15 | my $is_jx = $client =~ /^JCrossclient 1.0 alpha-(\d+)/ |
16 | ? join "", map chr, split /\./, $1 |
16 | ? join "", map chr, split /\./, $1 |
17 | : undef; |
17 | : undef; |
18 | |
18 | |
19 | if ($is_cf) { # && $is_cf lt v1.9.2) { |
19 | if ($is_cf) { # && $is_cf lt v1.9.2) { |
20 | $ns->send_packet (sprintf "drawinfo %d %s", cf::NDI_RED, "(enabling workaround for client buffer overflow)"); |
20 | $ns->send_drawinfo ("(enabling workaround for client buffer overflow)", cf::NDI_RED); |
21 | $ns->buggy_mapscroll (1); |
21 | $ns->buggy_mapscroll (1); |
22 | $ns->send_packet (sprintf "drawinfo %d %s", cf::NDI_RED, "(enabling workaround for broken face caching)"); |
22 | $ns->send_drawinfo ("(enabling workaround for broken face caching)", cf::NDI_RED); |
23 | $ns->force_bad_checksum (1); |
23 | $ns->force_bad_checksum (1); |
24 | } |
24 | } |
25 | |
25 | |
26 | if ($is_jx) { |
26 | if ($is_jx) { |
27 | $ns->send_packet (sprintf "drawinfo %d %s", cf::NDI_RED, "(enabling buggy map scroll workaround)"); |
27 | $ns->send_drawinfo ("(enabling buggy map scroll workaround)", cf::NDI_RED); |
28 | $ns->buggy_mapscroll (1); |
28 | $ns->buggy_mapscroll (1); |
29 | } |
29 | } |
30 | |
30 | |
31 | if ($is_jx) { |
31 | if ($is_jx) { |
32 | $ns->send_packet (sprintf "drawinfo %d %s", cf::NDI_RED, "You are using a known to be buggy client (an alpha version, too). " |
32 | $ns->send_drawinfo ("You are using a known to be buggy client (an alpha version, too). " |
33 | . "If you encounter map freezes or other bugs, consider using a more stable client " |
33 | . "If you encounter map freezes or other bugs, consider using a more stable client " |
34 | . "such as CFPlus or gcfclient or gcfclient2"); |
34 | . "such as CFPlus or gcfclient or gcfclient2", cf::NDI_RED); |
35 | } |
35 | } |
36 | |
36 | |
37 | if ($is_cf && $is_cf lt v1.9.1) { |
37 | if ($is_cf && $is_cf lt v1.9.1) { |
38 | $ns->send_packet (sprintf "drawinfo %d %s", cf::NDI_RED, <<EOF); |
38 | $ns->send_drawinfo (<<EOF, cf::NDI_RED); |
39 | |
39 | |
40 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
40 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
41 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
41 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
42 | *** WARNING: Your client is BUGGY |
42 | *** WARNING: Your client is BUGGY |
43 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** |
43 | *** *** *** *** *** *** *** *** *** *** *** *** *** *** |