]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_customtitle.cpp
Merge pull request #1084 from SaberUK/insp20+fix-parallel-debug-install
[user/henk/code/inspircd.git] / src / modules / m_customtitle.cpp
index a9704e7dedb90e3bc1ff24582cfe3756baf2c45e..c65645bc9209426d0382f3e81cfdc2725daca441 100644 (file)
@@ -33,7 +33,6 @@ class CommandTitle : public Command
                ctitle("ctitle", Creator)
        {
                syntax = "<user> <password>";
-               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);
        }