summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-08-25 18:24:06 -0400
committerAdam <Adam@anope.org>2011-09-10 01:58:39 -0400
commit62752db4c49a8679b51d5996003fd3a23c2a3f2d (patch)
treea947585812f85d97bddf66a79854d10acb11f713 /src
parentf025d1b495cee3aadb6b7b45652d1cab3b7b7b6d (diff)
Rewrote mlock saving/loading code to not use this silly extensible hack
Diffstat (limited to 'src')
-rw-r--r--src/regchannel.cpp39
-rw-r--r--src/servers.cpp2
2 files changed, 0 insertions, 41 deletions
diff --git a/src/regchannel.cpp b/src/regchannel.cpp
index 160b7102b..882649d54 100644
--- a/src/regchannel.cpp
+++ b/src/regchannel.cpp
@@ -449,45 +449,6 @@ void ChannelInfo::ClearBadWords()
EraseBadWord(0);
}
-/** Loads MLocked modes from extensible. This is used from database loading because Anope doesn't know what modes exist
- * until after it connects to the IRCd.
- */
-void ChannelInfo::LoadMLock()
-{
- if (!this->GetExt("db_mlock"))
- return;
-
- this->ClearMLock();
-
- // Force +r
- ChannelMode *chm = ModeManager::FindChannelModeByName(CMODE_REGISTERED);
- if (chm)
- this->SetMLock(chm, true);
-
- std::vector<Anope::string> mlock;
- this->GetExtRegular("db_mlock", mlock);
- for (unsigned i = 0; i < mlock.size(); ++i)
- {
- std::vector<Anope::string> mlockv = BuildStringVector(mlock[i]);
-
- bool set = mlockv[0] == "1";
- ChannelMode *cm = ModeManager::FindChannelModeByString(mlockv[1]);
- const Anope::string &setter = mlockv[2];
- time_t created = Anope::CurTime;
- try
- {
- created = convertTo<time_t>(mlockv[3]);
- }
- catch (const ConvertException &) { }
- const Anope::string &param = mlockv.size() > 4 ? mlockv[4] : "";
-
- if (cm != NULL)
- this->SetMLock(cm, set, param, setter, created);
- }
-
- this->Shrink("db_mlock");
-}
-
/** Check if a mode is mlocked
* @param mode The mode
* @param status True to check mlock on, false for mlock off
diff --git a/src/servers.cpp b/src/servers.cpp
index dccea8929..5a95bb85f 100644
--- a/src/servers.cpp
+++ b/src/servers.cpp
@@ -53,8 +53,6 @@ Server::Server(Server *uplink, const Anope::string &name, unsigned hops, const A
if (Me == this->UplinkServer && !this->HasFlag(SERVER_JUPED))
{
/* Now do mode related stuff as we know what modes exist .. */
- for (registered_channel_map::iterator it = RegisteredChannelList.begin(), it_end = RegisteredChannelList.end(); it != it_end; ++it)
- it->second->LoadMLock();
for (botinfo_map::iterator it = BotListByNick.begin(), it_end = BotListByNick.end(); it != it_end; ++it)
{
BotInfo *bi = it->second;