ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/maps/perl/schmorp-clientchk.ext
Revision: 1.3
Committed: Fri Aug 25 13:24:06 2006 UTC (17 years, 8 months ago) by root
Branch: MAIN
Changes since 1.2: +19 -18 lines
Log Message:
moved plug-ins to new plug-in system, where applicable

File Contents

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