diff options
-rw-r--r-- | data/chanserv.example.conf | 5 | ||||
-rw-r--r-- | modules/pseudoclients/chanserv.cpp | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/data/chanserv.example.conf b/data/chanserv.example.conf index d5e881ab2..5f7324503 100644 --- a/data/chanserv.example.conf +++ b/data/chanserv.example.conf @@ -139,9 +139,10 @@ module /* * Modes that are required to be set and only set on all registered channels. - * These modes can not be locked or unlocked. + * These modes can not be locked or unlocked. The registered channel mode is + * automatically always required, if such a mode exists. */ - require = "r" + #require = "r" /* * The maximum length of the reason field for user commands such as chanserv/kick diff --git a/modules/pseudoclients/chanserv.cpp b/modules/pseudoclients/chanserv.cpp index e1d98e64c..efb0a78ab 100644 --- a/modules/pseudoclients/chanserv.cpp +++ b/modules/pseudoclients/chanserv.cpp @@ -259,13 +259,15 @@ class ChanServCore : public Module, public ChanServService void OnCheckModes(Channel *c) anope_override { + if (c->ci) + c->SetMode(c->ci->WhoSends(), "REGISTERED", "", false); const Anope::string &require = Config->GetModule(this)->Get<const Anope::string>("require", "r"); if (!require.empty()) { if (c->ci) - c->SetModes(NULL, false, "+%s", require.c_str()); + c->SetModes(c->ci->WhoSends(), false, "+%s", require.c_str()); else - c->SetModes(NULL, false, "-%s", require.c_str()); + c->SetModes(c->ci->WhoSends(), false, "-%s", require.c_str()); } } |