#include "inspircd.h"
-/* $ModDesc: Forces connecting clients to send a PONG message back to the server before they can complete their connection */
-
class ModuleWaitPong : public Module
{
bool sendsnotice;
public:
ModuleWaitPong()
- : ext("waitpong_pingstr", this)
- {
- }
-
- void init() CXX11_OVERRIDE
+ : ext("waitpong_pingstr", ExtensionItem::EXT_USER, this)
{
- ServerInstance->Modules->AddService(ext);
- OnRehash(NULL);
- Implementation eventlist[] = { I_OnUserRegister, I_OnCheckReady, I_OnPreCommand, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
}
- void OnRehash(User* user) CXX11_OVERRIDE
+ void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
{
ConfigTag* tag = ServerInstance->Config->ConfValue("waitpong");
sendsnotice = tag->getBool("sendsnotice", true);