diff options
author | Adam <Adam@anope.org> | 2010-06-19 13:39:12 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-06-20 19:41:43 -0400 |
commit | 87aa70f2a9313adf40137bb91c43912e0d989be4 (patch) | |
tree | 553bd677cd7508bc41282b1a36212f41b129dec0 | |
parent | 89412e46c25d740d7f8fefeabee3819c407ec523 (diff) |
Made db-converter only write mlock params if there really is one, fixes some problems with converting mlock for certain databases
-rw-r--r-- | src/tools/db-convert.c | 8 |
1 files 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; } |