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

Send mode changes from ChanServ if the channel is not registered.

Avoids calling WhoSends() on a null pointer.
This commit is contained in:
Sadie Powell
2021-12-03 07:11:37 +00:00
parent 84ec0903ee
commit 4efc2c219b
+2 -2
View File
@@ -288,7 +288,7 @@ class ChanServCore : public Module, public ChanServService
if (c->ci)
c->SetMode(c->ci->WhoSends(), "REGISTERED", "", false);
else
c->RemoveMode(c->ci->WhoSends(), "REGISTERED", "", false);
c->RemoveMode(ChanServ, "REGISTERED", "", false);
const Anope::string &require = Config->GetModule(this)->Get<const Anope::string>("require");
if (!require.empty())
@@ -296,7 +296,7 @@ class ChanServCore : public Module, public ChanServService
if (c->ci)
c->SetModes(c->ci->WhoSends(), false, "+%s", require.c_str());
else
c->SetModes(c->ci->WhoSends(), false, "-%s", require.c_str());
c->SetModes(ChanServ, false, "-%s", require.c_str());
}
}