From 87aa70f2a9313adf40137bb91c43912e0d989be4 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 19 Jun 2010 13:39:12 -0400 Subject: [PATCH] Made db-converter only write mlock params if there really is one, fixes some problems with converting mlock for certain databases --- src/tools/db-convert.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tools/db-convert.c b/src/tools/db-convert.c index 0f8a35ebc..1bb8f5681 100644 --- a/src/tools/db-convert.c +++ b/src/tools/db-convert.c @@ -854,16 +854,16 @@ int main(int argc, char *argv[]) process_mlock_modes(fs, ci->mlock_off, ircd); fs << std::endl; } - if (ci->mlock_limit || ci->mlock_key || ci->mlock_flood || ci->mlock_redirect) + if (ci->mlock_limit || (ci->mlock_key && *ci->mlock_key) || (ci->mlock_flood && *ci->mlock_flood) || (ci->mlock_redirect && *ci->mlock_redirect)) { fs << "MD MLP"; if (ci->mlock_limit) fs << " CMODE_LIMIT " << ci->mlock_limit; - if (ci->mlock_key) + if (ci->mlock_key && *ci->mlock_key) fs << " CMODE_KEY " << ci->mlock_key; - if (ci->mlock_flood) + if (ci->mlock_flood && *ci->mlock_flood) fs << " CMODE_FLOOD " << ci->mlock_flood; - if (ci->mlock_redirect) + if (ci->mlock_redirect && *ci->mlock_redirect) fs << " CMODE_REDIRECT " << ci->mlock_redirect; fs << std::endl; }