From 6f0d1af596f65add0999ae30a5febf7969821a6a Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 17 Jan 2011 20:41:57 -0500 Subject: Made db_plain buffer database writes which prevents databases from coming corrupted if we crash or if write fails. Also fixed loading all ajoin channels. --- modules/core/ns_ajoin.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/core/ns_ajoin.cpp') diff --git a/modules/core/ns_ajoin.cpp b/modules/core/ns_ajoin.cpp index 1dec32078..29ddfab46 100644 --- a/modules/core/ns_ajoin.cpp +++ b/modules/core/ns_ajoin.cpp @@ -63,6 +63,8 @@ class CommandNSAJoin : public Command else { channels.erase(channels.begin() + i); + source.u->Account()->Extend("ns_ajoin_channels", new ExtensibleItemRegular > >(channels)); source.Reply(NICK_AJOIN_DELETED, params[1].c_str()); } } @@ -220,11 +222,11 @@ class NSAJoin : public Module for (unsigned i = 0; i < params.size(); ++i) { Anope::string chan, chankey; - commasepstream sep(params[0]); + commasepstream sep(params[i]); sep.GetToken(chan); sep.GetToken(chankey); - channels.push_back(std::make_pair(chan, chankey)); + channels.push_back(std::make_pair(chan, chankey)); } nc->Extend("ns_ajoin_channels", new ExtensibleItemRegular