From d31e6e1f3e9a52e23134525b26912f0ebd4f27c0 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Mon, 19 Nov 2012 00:20:48 +0100 Subject: m_customtitle Minor cleanup - Remove TRANSLATE() as it makes no sense here (user parameter is not a nick) - Compare strings with == instead of strcmp - PassCompare uses strings, pass them as-is without c_str() --- src/modules/m_customtitle.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp index a9704e7de..efe4b3247 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); -- cgit v1.2.3