]> git.donarmstrong.com Git - infobot.git/blobdiff - src/core.pl
safe delete did not run delFactoid, hah! found by asuffield
[infobot.git] / src / core.pl
index 8ce2a7bbc8678ccb42d0e2dcc901978a257396f4..3c8a7d1f2a5b8bac0c2da2a64cef52677db3e7c8 100644 (file)
@@ -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 {