X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_customtitle.cpp;h=8814e8cf6959aeea8e2e6aab076a8bfb39d1f176;hb=de69e28a4a1aea89e410b693bbbb67890ecb0bd3;hp=fc99cd29f24416302d1e5ffbe50f7a6b6f0a410f;hpb=6d57bbe05c31c79eaad02fe81cfb9c1ed6b79c58;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp index fc99cd29f..8814e8cf6 100644 --- a/src/modules/m_customtitle.cpp +++ b/src/modules/m_customtitle.cpp @@ -21,7 +21,7 @@ class CommandTitle : public Command { public: StringExtItem ctitle; - CommandTitle (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"TITLE",0,2), + CommandTitle(Module* Creator) : Command(Creator,"TITLE", 2), ctitle("ctitle", Creator) { syntax = " "; @@ -50,17 +50,17 @@ class CommandTitle : public Command snprintf(TheHost,MAXBUF,"%s@%s",user->ident.c_str(), user->host.c_str()); snprintf(TheIP, MAXBUF,"%s@%s",user->ident.c_str(), user->GetIPString()); - ConfigReader Conf(ServerInstance); + ConfigReader Conf; for (int i=0; iPassCompare(user, pass.c_str(), parameters[1].c_str(), hash.c_str()) && OneOfMatches(TheHost,TheIP,host.c_str()) && !title.empty()) + if (!strcmp(Name.c_str(),parameters[0].c_str()) && !ServerInstance->PassCompare(user, pass.c_str(), parameters[1].c_str(), hash.c_str()) && OneOfMatches(TheHost,TheIP,host.c_str()) && !title.empty()) { ctitle.set(user, title); @@ -86,10 +86,10 @@ class ModuleCustomTitle : public Module CommandTitle cmd; public: - ModuleCustomTitle(InspIRCd* Me) : Module(Me), cmd(Me, this) + ModuleCustomTitle() : cmd(this) { ServerInstance->AddCommand(&cmd); - Extensible::Register(&cmd.ctitle); + ServerInstance->Extensions.Register(&cmd.ctitle); ServerInstance->Modules->Attach(I_OnWhoisLine, this); }