X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2Fcore.pl;h=3c8a7d1f2a5b8bac0c2da2a64cef52677db3e7c8;hb=676a744c0752c02f747a8f61696d93a9aefe48cb;hp=8ce2a7bbc8678ccb42d0e2dcc901978a257396f4;hpb=a2dd9453db40a0641a4cdd606710ef6dd4ce4598;p=infobot.git diff --git a/src/core.pl b/src/core.pl index 8ce2a7b..3c8a7d1 100644 --- a/src/core.pl +++ b/src/core.pl @@ -29,7 +29,7 @@ use vars qw(@joinchan @ircServers @wingateBad @wingateNow @wingateCache # use vars qw(%count %netsplit %netsplitservers %flood %dcc %orig %nuh %talkWho %seen %floodwarn %param %dbh %ircPort - %jointime %topic %joinverb %moduleAge %last %time %mask %file + %topic %moduleAge %last %time %mask %file %forked %chanconf %channels ); @@ -131,8 +131,16 @@ sub ChanConfList { return unless (defined $param); my %chan = &getChanConfList($param); - ### TODO: -option is included aswell though. - return keys %chan; + # what if we have it set on _default and a few channels with + # negative set? perhaps we should disable -blah settings to remove + # this mess. + + if (exists $chan{_default}) { + return keys %chanconf; + } else { + ### TODO: -option is included aswell though. + return keys %chan; + } } ##### @@ -192,10 +200,11 @@ sub IsChanConf { return $chan{_default} || 0; } - &DEBUG("param => $param, msgType => $msgType."); - foreach (keys %chan) { - &DEBUG(" $_ => $chan{$_}"); - } +### debug purposes only. +# &DEBUG("param => $param, msgType => $msgType."); +# foreach (keys %chan) { +# &DEBUG(" $_ => $chan{$_}"); +# } return 0; } @@ -279,7 +288,7 @@ sub setup { # read. &loadLang($bot_misc_dir. "/blootbot.lang"); - &loadIRCServers($bot_misc_dir. "/ircII.servers"); + &loadIRCServers(); &readUserFile(); &readChanFile(); &loadMyModulesNow(); # must be after chan file. @@ -344,9 +353,6 @@ sub shutdown { &closeDB(); &closeSHM($shm); # aswell. TODO: use this in &doExit? &closeLog(); - ### is this valid? - &writeUserFile(); - &writeChanFile(); } sub restart {