From acdcedfa7099659be22df3dd57ec4926809dc1a6 Mon Sep 17 00:00:00 2001 From: Janik Kleinhoff Date: Fri, 4 Sep 2015 03:44:40 +0000 Subject: 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. --- meta.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'meta.pl') 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}), -- cgit v1.2.3