ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/maps/perl/schmorp-clientchk.ext
(Generate patch)

Comparing deliantra/maps/perl/schmorp-clientchk.ext (file contents):
Revision 1.2 by root, Mon Aug 21 07:13:54 2006 UTC vs.
Revision 1.3 by root, Fri Aug 25 13:24:06 2006 UTC

1#! perl 1#! perl
2 2
3# check client version and string for old clients and possibly issue warnings for them 3# check client version and string for old clients and possibly issue warnings for them
4 4
5sub on_login { 5cf::attach_to_players
6 on_login => sub {
6 my ($pl, $host) = @_; 7 my ($pl) = @_;
7 8
8 my $client = $pl->client; 9 my $client = $pl->client;
9 10
10 my $is_cf = $client =~ /^(?:GTK|X11) (?:Unix|Win32) Client ([.0-9]+)/ 11 my $is_cf = $client =~ /^(?:GTK|X11) (?:Unix|Win32) Client ([.0-9]+)/
11 ? join "", map chr, split /\./, $1 12 ? join "", map chr, split /\./, $1
12 : undef; 13 : undef;
13 14
14 if ($is_cf && $is_cf lt v1.9.2) { 15 if ($is_cf && $is_cf lt v1.9.2) {
15 $pl->ob->message ("(enabling workaround for client buffer overflow)", cf::NDI_RED | cf::NDI_UNIQUE); 16 $pl->ob->message ("(enabling workaround for client buffer overflow)", cf::NDI_RED | cf::NDI_UNIQUE);
16 $pl->buggy_mapscroll; 17 $pl->buggy_mapscroll;
17 } 18 }
18 19
19 if ($is_cf && $is_cf lt v1.9.1) { 20 if ($is_cf && $is_cf lt v1.9.1) {
20 $pl->ob->message (<<EOF, cf::NDI_RED | cf::NDI_UNIQUE); 21 $pl->ob->message (<<EOF, cf::NDI_RED | cf::NDI_UNIQUE);
21 22
22*** *** *** *** *** *** *** *** *** *** *** *** *** *** 23*** *** *** *** *** *** *** *** *** *** *** *** *** ***
23*** *** *** *** *** *** *** *** *** *** *** *** *** *** 24*** *** *** *** *** *** *** *** *** *** *** *** *** ***
24*** WARNING: Your client is BUGGY 25*** WARNING: Your client is BUGGY
25*** *** *** *** *** *** *** *** *** *** *** *** *** *** 26*** *** *** *** *** *** *** *** *** *** *** *** *** ***
26*** *** *** *** *** *** *** *** *** *** *** *** *** *** 27*** *** *** *** *** *** *** *** *** *** *** *** *** ***
27 28
28Your client ($client) is known to be buggy. Upgrading is highly recommended, otherwise you may experience crashes, strange lockups or other problems. 29Your client ($client) is known to be buggy. Upgrading is highly recommended, otherwise you may experience crashes, strange lockups or other problems.
29 30
30EOF 31EOF
32 }
31 } 33 },
34;
32 35
33 ()
34}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines