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:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user