From c967a4ce88c9b3bcdfd450eb917f1d50b04a96fe Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 21 Nov 2013 17:31:18 -0500 Subject: Shrink nick and channel default flags in db_old, otherwise converted nicks/channels always end up with the defaults enabled, even if they explicitly have them set off. Fix setting nickserv defaults to none. --- modules/database/db_old.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'modules/database/db_old.cpp') diff --git a/modules/database/db_old.cpp b/modules/database/db_old.cpp index 97cd5bce5..f67ff1b2a 100644 --- a/modules/database/db_old.cpp +++ b/modules/database/db_old.cpp @@ -429,6 +429,11 @@ static void LoadNicks() READ(read_string(buffer, f)); NickCore *nc = new NickCore(buffer); + const Anope::string settings[] = { "killprotect", "kill_quick", "ns_secure", "ns_private", "hide_email", + "hide_mask", "hide_quit", "memo_signon", "memo_receive", "autoop", "msg", "ns_keepmodes" }; + for (unsigned j = 0; j < sizeof(settings) / sizeof(Anope::string); ++j) + nc->Shrink(settings[j].upper()); + char pwbuf[32]; READ(read_buffer(pwbuf, f)); if (hashm == "plain") @@ -692,6 +697,11 @@ static void LoadChannels() READ(read_buffer(namebuf, f)); ChannelInfo *ci = new ChannelInfo(namebuf); + const Anope::string settings[] = { "keeptopic", "peace", "cs_private", "restricted", "cs_secure", "secureops", "securefounder", + "signkick", "signkick_level", "topiclock", "persist", "noautoop", "cs_keepmodes" }; + for (unsigned j = 0; j < sizeof(settings) / sizeof(Anope::string); ++j) + ci->Shrink(settings[j].upper()); + READ(read_string(buffer, f)); ci->SetFounder(NickCore::Find(buffer)); -- cgit