1
0
mirror of https://github.com/anope/anope.git synced 2026-06-27 17:26:39 +02:00

Fixed /os reload doing weird things to service channels, and allow setting modes by clients on burst

This commit is contained in:
Adam
2011-09-19 18:35:40 -04:00
parent 7dce64e540
commit 43201ead95
11 changed files with 50 additions and 26 deletions
+15 -4
View File
@@ -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;