summaryrefslogtreecommitdiff
path: root/src/config.cpp
diff options
context:
space:
mode:
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;