Switch to the IRCv3 standard-replies cap.

Nothing is using this so far so I'm not counting it as a breaking
change.
This commit is contained in:
Sadie Powell 2022-12-30 15:45:07 +00:00
parent 68c2629ec1
commit 297212ca4d
4 changed files with 9 additions and 5 deletions

View File

@ -1225,7 +1225,10 @@
# The following block can be used to control which extensions are
# enabled. Note that extended-join can be incompatible with delayjoin
# and host cycling.
#<ircv3 accountnotify="yes" awaynotify="yes" extendedjoin="yes">
#<ircv3 accountnotify="yes"
# awaynotify="yes"
# extendedjoin="yes"
# standardreplies="yes">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# IRCv3 account-tag module. Adds the 'account' tag which contains the

View File

@ -33,13 +33,13 @@ namespace IRCv3
}
}
/** Reference to the inspircd.org/standard-replies cap. */
/** Reference to the standard-replies cap. */
class IRCv3::Replies::CapReference
: public Cap::Reference
{
public:
CapReference(Module* mod)
: Cap::Reference(mod, "inspircd.org/standard-replies")
: Cap::Reference(mod, "standard-replies")
{
}
};

View File

@ -490,13 +490,11 @@ class ModuleCap : public Module
private:
CommandCap cmd;
PoisonCap poisoncap;
Cap::Capability stdrplcap;
public:
ModuleCap()
: cmd(this)
, poisoncap(this)
, stdrplcap(this, "inspircd.org/standard-replies")
{
}

View File

@ -123,6 +123,7 @@ class ModuleIRCv3
ClientProtocol::EventProvider accountprotoev;
Monitor::API monitorapi;
Cap::Capability stdrplcap;
public:
ModuleIRCv3()
@ -132,6 +133,7 @@ class ModuleIRCv3
, joinhook(this)
, accountprotoev(this, "ACCOUNT")
, monitorapi(this)
, stdrplcap(this, "standard-replies")
{
}
@ -141,6 +143,7 @@ class ModuleIRCv3
cap_accountnotify.SetActive(conf->getBool("accountnotify", true));
joinhook.awaycap.SetActive(conf->getBool("awaynotify", true));
joinhook.extendedjoincap.SetActive(conf->getBool("extendedjoin", true));
stdrplcap.SetActive(conf->getBool("standardreplies", true));
}
void OnAccountChange(User* user, const std::string& newaccount) CXX11_OVERRIDE