From 1b30a95400341aaae613009f069feba930cc46e1 Mon Sep 17 00:00:00 2001 From: "ribosome ribosome@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Thu, 10 Jun 2004 00:08:49 +0000 Subject: BUILD : 1.7.3 (183) BUGS : 92 NOTES : Added check to see if MysqlName and MysqlUser were not null to avoid any problems. git-svn-id: svn://svn.anope.org/anope/trunk@183 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@128 5417fbe8-f217-4b02-8779-1006273d7864 --- mysql.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mysql.c') diff --git a/mysql.c b/mysql.c index 4479596bc..1b83502c2 100644 --- a/mysql.c +++ b/mysql.c @@ -59,6 +59,15 @@ int db_mysql_init() alog("MySQL has been enabled."); } + /* The following configuration options are required. + * If missing disable MySQL to avoid any problems. + */ + + if (!MysqlName || !MysqlUser) { + do_mysql = 0; + alog("MySQL Error: Set all required configuration options."); + } + if (!db_mysql_open()) do_mysql = 0; -- cgit