+ # this looks evil...
+ if (0 and !defined $chan) {
+ &DEBUG("gCC: ok !chan... doing _default instead.");
+ }
+
+ $c ||= $chan;
+ $c ||= "_default";
+ $c = "_default" if ($c eq "*"); # FIXME
+ my @c = grep /^\Q$c\E$/i, keys %chanconf;
+
+ if (@c) {
+ if (0 and $c[0] ne $c) {
+ &WARN("c ne chan ($c[0] ne $chan)");
+ }
+ if (!defined $chanconf{$c[0]}{$param} and ($c ne '_default')) {
+ return &getChanConf($param, '_default');
+ }
+ #&DEBUG("gCC: $param,$c \"" . $chanconf{$c[0]}{$param} . '"');
+ return $chanconf{$c[0]}{$param};
+ }
+
+ #&DEBUG("gCC: returning _default... " . $chanconf{"_default"}{$param});
+ return $chanconf{"_default"}{$param};
+}
+
+sub getChanConfDefault {
+ my($what, $default, $chan) = @_;