]> git.donarmstrong.com Git - infobot.git/blobdiff - src/core.pl
- fixed dns lookup
[infobot.git] / src / core.pl
index 87ebb64c184f621308af49c8da16f81810bd3d5f..36e8c76b66eca42a3d37072b62892305937abd22 100644 (file)
@@ -268,23 +268,30 @@ sub IsChanConf {
 #  About: Retrieve value for 'param' value in current/default chan.
 # Return: scalar for success, undef for failure.
 sub getChanConf {
-    my($param,$chan)   = @_;
+    my($param,$c)      = @_;
 
     if (!defined $param) {
        &WARN("param == NULL.");
        return 0;
     }
 
-    $chan      ||= "_default";
-    my @c      = grep /^$chan$/i, keys %chanconf;
+    # this looks evil... 
+    if (0 and !defined $chan) {
+       &DEBUG("gCC: ok !chan... doing _default instead.");
+    }
+
+    $c         ||= $chan;
+    $c         ||= "_default";
+    my @c      = grep /^$c$/i, keys %chanconf;
 
     if (@c) {
-       if ($c[0] ne $chan) {
+       if (0 and $c[0] ne $c) {
            &WARN("c ne chan ($c[0] ne $chan)");
        }
        return $chanconf{$c[0]}{$param};
     }
 
+#    &DEBUG("gCC: returning _default... ");
     return $chanconf{"_default"}{$param};
 }