From 8110526befb458fc9244b3149dbe6163257be011 Mon Sep 17 00:00:00 2001 From: timriker Date: Fri, 18 Feb 2005 07:45:25 +0000 Subject: [PATCH] getChanConf checks _default too git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@1146 c11ca15a-4712-0410-83d8-924469b57eb5 --- blootbot/ChangeLog | 2 +- blootbot/src/core.pl | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/blootbot/ChangeLog b/blootbot/ChangeLog index 97869ca..ac10b87 100644 --- a/blootbot/ChangeLog +++ b/blootbot/ChangeLog @@ -1,4 +1,4 @@ - + * src/core.pl: getChanConf checks _default too * src/: "s/hasParam/IsChanConfOrWarn/" * src/: add handling for channel specific factoids: "#botpark logs" -> http://ibot.rikers.org/botpark diff --git a/blootbot/src/core.pl b/blootbot/src/core.pl index 9cdbb25..20a85c3 100644 --- a/blootbot/src/core.pl +++ b/blootbot/src/core.pl @@ -326,10 +326,14 @@ sub getChanConf { 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... "); + #&DEBUG("gCC: returning _default... " . $chanconf{"_default"}{$param}); return $chanconf{"_default"}{$param}; } -- 2.39.5