1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 19:14:47 +02:00

Made db-converter only write mlock params if there really is one, fixes some problems with converting mlock for certain databases

This commit is contained in:
Adam
2010-06-19 13:39:12 -04:00
parent 89412e46c2
commit 87aa70f2a9
+4 -4
View File
@@ -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;
}