1 |
root |
1.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 |
|
|
} |