diff options
| author | 2015-09-04 03:44:40 +0000 | |
|---|---|---|
| committer | 2015-09-04 03:44:40 +0000 | |
| commit | acdcedfa7099659be22df3dd57ec4926809dc1a6 (patch) | |
| tree | 0c1c03c2e0a6c98ef9f7a8f934f2d56a86b1f46e /meta.pl | |
| parent | 266be47956ae2ad397c52f26d00b88b5dc713da6 (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-x | meta.pl | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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}), |
