+if ($min_script_version)
+{
+ $client_conf->{script_version} ||= '0.0';
+ my ($minmajor,$minminor) = split(/\./,$min_script_version);
+ my ($smajor,$sminor) = split(/\./,$client_conf->{script_version});
+ if ($minmajor > $smajor || ($minmajor == $smajor && $minminor > $sminor))
+ {
+ print "Status: 460 script version too low\nContent-Type: text/plain\n\n";
+ print
+ "Script version is below minimum required\n",
+ "Reported version: $client_conf->{script_version},",
+ "Minumum version required: $min_script_version\n";
+ $db->disconnect;
+ exit;
+ }
+}
+
+if ($min_web_script_version)
+{
+ $client_conf->{web_script_version} ||= '0.0';
+ my ($minmajor,$minminor) = split(/\./,$min_script_version);
+ my ($smajor,$sminor) = split(/\./,$client_conf->{script_version});
+ if ($minmajor > $smajor || ($minmajor == $smajor && $minminor > $sminor))
+ {
+ print "Status: 461 web script version too low\nContent-Type: text/plain\n\n";
+ print
+ "Web Script version is below minimum required\n",
+ "Reported version: $client_conf->{web_script_version},",
+ "Minumum version required: $min_web_script_version\n";
+ $db->disconnect;
+ exit;
+ }
+}
+
+my @config_flags;
+if (not exists $client_conf->{config_opts} )
+{
+ @config_flags = ();
+}
+elsif (ref $client_conf->{config_opts} eq 'HASH')
+{
+ # leave out keys with false values
+ @config_flags = grep { $client_conf->{config_opts}->{$_} }
+ keys %{$client_conf->{config_opts}};
+}
+elsif (ref $client_conf->{config_opts} eq 'ARRAY' )
+{
+ @config_flags = @{$client_conf->{config_opts}};
+}
+