X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fu_listmode.h;h=b370c86e864d4ea513820556e0b7867968b9825d;hb=822f3f13f18b7e79d5740416f9417dabb9296859;hp=dde36a482ddfaf0cfbc7e9ba9a584e0fe92dc2f8;hpb=2d2e0469b8ac7c64c9dc22f7074db8fc245e2f13;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/u_listmode.h b/src/modules/u_listmode.h index dde36a482..b370c86e8 100644 --- a/src/modules/u_listmode.h +++ b/src/modules/u_listmode.h @@ -100,8 +100,6 @@ class ListModeBase : public ModeHandler configtag(ctag), extItem("listbase_mode_" + name + "_list", Creator) { list = true; - this->DoRehash(); - ServerInstance->Extensions.Register(&extItem); } /** See mode.h @@ -216,8 +214,10 @@ class ListModeBase : public ModeHandler */ virtual void DoImplements(Module* m) { + ServerInstance->Modules->AddService(extItem); + this->DoRehash(); Implementation eventlist[] = { I_OnSyncChannel, I_OnRehash }; - ServerInstance->Modules->Attach(eventlist, m, 2); + ServerInstance->Modules->Attach(eventlist, m, sizeof(eventlist)/sizeof(Implementation)); } /** Handle the list mode.