diff options
author | Sadie Powell <sadie@witchery.services> | 2021-12-03 07:11:37 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2021-12-03 07:11:37 +0000 |
commit | 4efc2c219bbe8030f8d079e27770f19cfe7e442d (patch) | |
tree | c48797e7b24d9d1d81797a99e626905ea8838251 | |
parent | 84ec0903ee688c1f236efd73fc3954ed69104128 (diff) |
Send mode changes from ChanServ if the channel is not registered.
Avoids calling WhoSends() on a null pointer.
-rw-r--r-- | modules/pseudoclients/chanserv.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/pseudoclients/chanserv.cpp b/modules/pseudoclients/chanserv.cpp index 5acfe8e55..36f28d924 100644 --- a/modules/pseudoclients/chanserv.cpp +++ b/modules/pseudoclients/chanserv.cpp @@ -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()); } } |