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:
+15
-4
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user