+sub getChanConfDefault {
+ my($what, $default, $chan) = @_;
+
+ $chan ||= "_default";
+
+ if (exists $param{$what}) {
+ if (!exists $cache{config}{$what}) {
+ &status("config ($chan): backward-compatible option: found param{$what} ($param{$what}) instead of chan option");
+ $cache{config}{$what} = 1;
+ }
+
+ return $param{$what};
+ }
+ my $val = &getChanConf($what, $chan);
+ return $val if (defined $val);
+
+ $param{$what} = $default;
+ &status("config ($chan): auto-setting param{$what} = $default");
+ $cache{config}{$what} = 1;
+ return $default;
+}
+
+