Add an 005 token to let clients know that fakelag is enabled.

This commit is contained in:
Sadie Powell 2025-03-02 16:01:43 +00:00
parent ccdf1d4975
commit 5ea0bfff6f

View File

@ -62,6 +62,7 @@ struct ISupportAction final
class CoreModInfo final
: public Module
, public ISupport::EventListener
{
private:
CommandAdmin cmdadmin;
@ -111,6 +112,7 @@ private:
public:
CoreModInfo()
: Module(VF_CORE | VF_VENDOR, "Provides the ADMIN, COMMANDS, INFO, MODULES, MOTD, TIME, SERVLIST, and VERSION commands")
, ISupport::EventListener(this)
, cmdadmin(this)
, cmdcommands(this)
, cmdinfo(this)
@ -237,6 +239,12 @@ public:
{
ServerInstance->Modules.SetPriority(this, I_OnUserConnect, PRIORITY_FIRST);
}
void OnBuildClassISupport(const std::shared_ptr<ConnectClass>& klass, ISupport::TokenMap& tokens) override
{
if (klass->fakelag)
tokens["FAKELAG"];
}
};
MODULE_INIT(CoreModInfo)