]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_customtitle.cpp
Merge pull request #976 from SaberUK/master+fix-xline-db
[user/henk/code/inspircd.git] / src / modules / m_customtitle.cpp
index 0153530869e3ac6380b0005f1fc385660de71142..67eca6dda8d0c596e7886494572b3a473b989dd5 100644 (file)
@@ -28,7 +28,7 @@ class CommandTitle : public Command
  public:
        StringExtItem ctitle;
        CommandTitle(Module* Creator) : Command(Creator,"TITLE", 2),
-               ctitle("ctitle", Creator)
+               ctitle("ctitle", ExtensionItem::EXT_USER, Creator)
        {
                syntax = "<user> <password>";
        }
@@ -48,7 +48,7 @@ class CommandTitle : public Command
                        std::string title = i->second->getString("title");
                        std::string vhost = i->second->getString("vhost");
 
-                       if (Name == parameters[0] && !ServerInstance->PassCompare(user, pass, parameters[1], hash) &&
+                       if (Name == parameters[0] && ServerInstance->PassCompare(user, pass, parameters[1], hash) &&
                                InspIRCd::MatchMask(host, userHost, userIP) && !title.empty())
                        {
                                ctitle.set(user, title);
@@ -56,7 +56,7 @@ class CommandTitle : public Command
                                ServerInstance->PI->SendMetaData(user, "ctitle", title);
 
                                if (!vhost.empty())
-                                       user->ChangeDisplayedHost(vhost.c_str());
+                                       user->ChangeDisplayedHost(vhost);
 
                                user->WriteNotice("Custom title set to '" + title + "'");