ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/maps/perl/schmorp-clientchk.ext
Revision: 1.1
Committed: Mon Aug 21 06:47:53 2006 UTC (17 years, 9 months ago) by root
Branch: MAIN
Log Message:
*** empty log message ***

File Contents

# Content
1 #! perl
2
3 # check client version and string for old clients and possibly issue warnings for them
4
5 sub on_login {
6 my ($pl, $host) = @_;
7
8 my $client = $pl->client;
9
10 my $is_cf = $client =~ /^(?:GTK|X11) (?:Unix|Win32) Client ([.0-9]+)/ && $1;
11 warn "$client> is_cf is <$is_cf>\n";#d#
12
13 if ($is_cf && (join "", map chr, split /\./, $is_cf) lt v1.9.1) {
14 $pl->ob->message (<<EOF, cf::NDI_RED | cf::NDI_UNIQUE);
15
16 *** *** *** *** *** *** *** *** *** *** *** *** *** ***
17 *** *** *** *** *** *** *** *** *** *** *** *** *** ***
18 *** WARNING: Your client is BUGGY
19 *** *** *** *** *** *** *** *** *** *** *** *** *** ***
20 *** *** *** *** *** *** *** *** *** *** *** *** *** ***
21
22 Your client ($client) is known to be buggy. If you experience crashes, strange lockups or other problems, consider upgrading to the current version.
23
24 EOF
25 }
26
27 ()
28 }