summaryrefslogtreecommitdiffstats
path: root/meta.pl
diff options
context:
space:
mode:
authorLibravatarJanik Kleinhoff <janik@kleinhoff.de>2015-09-04 03:44:40 +0000
committerLibravatarJanik Kleinhoff <janik@kleinhoff.de>2015-09-04 03:44:40 +0000
commitacdcedfa7099659be22df3dd57ec4926809dc1a6 (patch)
tree0c1c03c2e0a6c98ef9f7a8f934f2d56a86b1f46e /meta.pl
parent266be47956ae2ad397c52f26d00b88b5dc713da6 (diff)
Allow running without a database
This is mostly a workaround for the DB being a bit of a PITA to set up, but not all we do requires a DB so we might as well offer to run without one.
Diffstat (limited to 'meta.pl')
-rwxr-xr-xmeta.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/meta.pl b/meta.pl
index d00ca18..00045a6 100755
--- a/meta.pl
+++ b/meta.pl
@@ -94,9 +94,11 @@ sub init {
$host = ${$::settings->{server}}[rand @{$::settings->{server}}];
ASM::Util->dprint( "Connecting to $host", "startup");
$irc->debug($::debug);
- $::db = ASM::DB->new($::mysql->{db}, $::mysql->{host}, $::mysql->{port},
- $::mysql->{user}, $::mysql->{pass}, $::mysql->{table},
- $::mysql->{actiontable}, $::mysql->{dblog});
+ if (!$::mysql->{disable}) {
+ $::db = ASM::DB->new($::mysql->{db}, $::mysql->{host}, $::mysql->{port},
+ $::mysql->{user}, $::mysql->{pass}, $::mysql->{table},
+ $::mysql->{actiontable}, $::mysql->{dblog});
+ }
$conn = $irc->newconn( Server => $host,
Port => $::settings->{port} || '6667',
SSL => defined($::settings->{ssl}),