summaryrefslogtreecommitdiff
path: root/src/config.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-09-19 18:35:40 -0400
committerAdam <Adam@anope.org>2011-09-19 18:35:40 -0400
commit43201ead9575a74e350710bc191f4ac67366aca7 (patch)
treee83dd66b689181548647d80e8d181eb13d190ba7 /src/config.cpp
parent7dce64e5400b180f1645c683614ecc3eee2bfddd (diff)
Fixed /os reload doing weird things to service channels, and allow setting modes by clients on burst
Diffstat (limited to 'src/config.cpp')
-rw-r--r--src/config.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/config.cpp b/src/config.cpp
index 5cb067735..ebe31cbbc 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -981,12 +981,23 @@ static bool DoServices(ServerConfig *config, const Anope::string &, const Anope:
{
size_t ch = oldchannels[i].find('#');
Anope::string chname = oldchannels[i].substr(ch != Anope::string::npos ? ch : 0);
- if (std::find(bi->botchannels.begin(), bi->botchannels.end(), chname) == bi->botchannels.end())
+
+ bool found = false;
+ for (unsigned j = 0; j < bi->botchannels.size(); ++j)
{
- Channel *c = findchan(chname);
- if (c)
- bi->Part(c);
+ ch = bi->botchannels[j].find('#');
+ Anope::string ochname = bi->botchannels[j].substr(ch != Anope::string::npos ? ch : 0);
+
+ if (chname.equals_ci(ochname))
+ found = true;
}
+
+ if (found)
+ continue;
+
+ Channel *c = findchan(chname);
+ if (c)
+ bi->Part(c);
}
return true;