X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_customtitle.cpp;h=c65645bc9209426d0382f3e81cfdc2725daca441;hb=5f223beeaee91d8827454475c4ef6f679af4385d;hp=a9704e7dedb90e3bc1ff24582cfe3756baf2c45e;hpb=a4db7bf9af00b32d4f5c1922997d02b0b8be59e5;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp index a9704e7de..c65645bc9 100644 --- a/src/modules/m_customtitle.cpp +++ b/src/modules/m_customtitle.cpp @@ -33,7 +33,6 @@ class CommandTitle : public Command ctitle("ctitle", Creator) { syntax = " "; - TRANSLATE3(TR_NICK, TR_TEXT, TR_END); } bool OneOfMatches(const char* host, const char* ip, const char* hostlist) @@ -68,7 +67,7 @@ class CommandTitle : public Command std::string title = i->second->getString("title"); std::string vhost = i->second->getString("vhost"); - 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()) + if (Name == parameters[0] && !ServerInstance->PassCompare(user, pass, parameters[1], hash) && OneOfMatches(TheHost,TheIP,host.c_str()) && !title.empty()) { ctitle.set(user, title); @@ -96,8 +95,12 @@ class ModuleCustomTitle : public Module public: ModuleCustomTitle() : cmd(this) { - ServerInstance->AddCommand(&cmd); - ServerInstance->Extensions.Register(&cmd.ctitle); + } + + void init() + { + ServerInstance->Modules->AddService(cmd); + ServerInstance->Modules->AddService(cmd.ctitle); ServerInstance->Modules->Attach(I_OnWhoisLine, this); }