Added a debug mode.
This commit is contained in:
1 parent
293b08a761
commit
3118964e80
2 files changed
+14
No files matched your search
@@ -23,6 +23,7 @@ use Parser::Lang;
|
||||
#use Parser::IRC;
|
||||
#use Sys;
|
||||
|
||||
# Set version information.
|
||||
use constant {
|
||||
NAME => 'Auto IRC Bot',
|
||||
VER => 3,
|
||||
@@ -31,9 +32,19 @@ use constant {
|
||||
RSTAGE => 'd'
|
||||
};
|
||||
|
||||
# Check for debug mode.
|
||||
our $DEBUG = 0;
|
||||
if (defined $ARGV[0]) {
|
||||
if ($ARGV[0] eq '-d') {
|
||||
$DEBUG = 1;
|
||||
}
|
||||
}
|
||||
|
||||
# Parse configuration file.
|
||||
our $CONF = Parser::Config->new("auto.conf") or print "Failed to open configuration file.\n" and exit;
|
||||
our %SETTINGS = $CONF->parse;
|
||||
|
||||
# Parse translations.
|
||||
my @lclv = API::Std::conf_get("locale");
|
||||
our $LOCALE = $lclv[0][0];
|
||||
my @lang = split('_', $LOCALE);
|
||||
@@ -41,4 +52,5 @@ Parser::Lang::parse($lang[0]);
|
||||
undef @lang;
|
||||
undef @lclv;
|
||||
|
||||
# Expire old logs.
|
||||
API::Log::expire_logs();
|
||||
@@ -3,6 +3,8 @@ Auto IRC Bot 3.0: Change Log
|
||||
|
||||
3.0 Indev
|
||||
==================================================================
|
||||
* Added a debug mode.
|
||||
* Old logs can now expire if set to do so in config.
|
||||
* Added API function alog()
|
||||
* Added API::Log::expire_logs()
|
||||
* Added API function println()
|
||||
|
||||
Reference in new issue
Block a user