X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fu_listmode.h;h=b370c86e864d4ea513820556e0b7867968b9825d;hb=822f3f13f18b7e79d5740416f9417dabb9296859;hp=c6e1f9add129abb98af4e4c131f6ab8246d54140;hpb=fcacc8e0306382bc3f938073092c3729d77e2b41;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/u_listmode.h b/src/modules/u_listmode.h index c6e1f9add..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. @@ -303,7 +303,7 @@ class ListModeBase : public ModeHandler source->WriteNumeric(478, "%s %s %s :Channel ban/ignore list is full", source->nick.c_str(), channel->name.c_str(), parameter.c_str()); } - parameter = ""; + parameter.clear(); return MODEACTION_DENY; } else @@ -325,14 +325,14 @@ class ListModeBase : public ModeHandler } /* Tried to remove something that wasn't set */ TellNotSet(source, channel, parameter); - parameter = ""; + parameter.clear(); return MODEACTION_DENY; } else { /* Hmm, taking an exception off a non-existant list, DIE */ TellNotSet(source, channel, parameter); - parameter = ""; + parameter.clear(); return MODEACTION_DENY; } }