X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_customtitle.cpp;h=67eca6dda8d0c596e7886494572b3a473b989dd5;hb=0ec19b7ac91eedc83b31c3da733e237bfe28fc48;hp=0153530869e3ac6380b0005f1fc385660de71142;hpb=6c7a3ceb6c674a9af09da955ee0238e9291cf29a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp index 015353086..67eca6dda 100644 --- a/src/modules/m_customtitle.cpp +++ b/src/modules/m_customtitle.cpp @@ -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 = " "; } @@ -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 + "'");