From 0276e5138a8f886fe709ffed534aaf5ff826b5be Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 18 May 2008 17:51:36 +0000 Subject: Remove .c_str()'s in match() calls that are no longer needed as match() natively takes std::strings git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9737 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_banexception.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/modules/m_banexception.cpp') diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp index bfb64449f..d90cbff29 100644 --- a/src/modules/m_banexception.cpp +++ b/src/modules/m_banexception.cpp @@ -73,9 +73,7 @@ public: return 0; } - char mask[MAXBUF]; - snprintf(mask, MAXBUF, "%s!%s@%s", user->nick, user->ident, user->GetIPString()); - + std::string mask = std::string(user->nick) + "!" + user->ident + "@" + user->GetIPString(); for (modelist::iterator it = list->begin(); it != list->end(); it++) { if (match(user->GetFullRealHost(), it->mask) || match(user->GetFullHost(), it->mask) || (match(mask, it->mask, true))) @@ -117,7 +115,6 @@ public: LM->chan->GetExt(be->GetInfoKey(), list); if (list) { - char mask[MAXBUF]; std::string mask = std::string(LM->user->nick) + "!" + LM->user->ident + "@" + LM->user->GetIPString(); for (modelist::iterator it = list->begin(); it != list->end(); it++) { -- cgit v1.2.3