&quit($param{'quitMsg'}) if (&whatInterface() =~ /IRC/);
&writeUserFile();
&writeChanFile();
- &uptimeWriteFile() if (&IsParam("uptime"));
+ &uptimeWriteFile() if (&ChanConfList("uptime"));
&closeDB();
&closeSHM($shm);
&dumpallvars() if (&IsParam("dumpvarsAtExit"));
# Return: array of channels
sub ChanConfList {
my $param = $_[0];
- my %chan = &getChanConfList($param);
-
return unless (defined $param);
+ my %chan = &getChanConfList($param);
### TODO: -option is included aswell though.
- if ($chan{_default}) {
- return keys %channels;
- } else {
- return keys %chan;
- }
+ return keys %chan;
}
#####
$count{'Question'} = 0;
$count{'Update'} = 0;
$count{'Dunno'} = 0;
+ $count{'Moron'} = 0;
}
sub shutdown {
&closeDB();
&closeSHM($shm); # aswell. TODO: use this in &doExit?
&closeLog();
+ ### is this valid?
+ &writeUserFile();
+ &writeChanFile();
}
sub restart {
return;
}
+ &DCCBroadcast("-HUP called.","m");
&shutdown();
&loadConfig($bot_misc_dir."/blootbot.config");
&reloadAllModules() if (&IsParam("DEBUG"));