From 3681528e5a13c4e85b7276def209a2d6e73f4d2e Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 10 Feb 2007 21:31:40 +0000 Subject: Use userrec::MakeHost(), not strlcpy/strlcat! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6568 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/commands.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src') diff --git a/src/commands.cpp b/src/commands.cpp index aa43685d4..15070abdf 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -103,7 +103,6 @@ long InspIRCd::Duration(const char* str) bool InspIRCd::HostMatchesEveryone(const std::string &mask, userrec* user) { - char buffer[MAXBUF]; char itrigger[MAXBUF]; long matches = 0; @@ -115,10 +114,7 @@ bool InspIRCd::HostMatchesEveryone(const std::string &mask, userrec* user) for (user_hash::iterator u = clientlist->begin(); u != clientlist->end(); u++) { - strlcpy(buffer,u->second->ident,MAXBUF); - charlcat(buffer,'@',MAXBUF); - strlcat(buffer,u->second->host,MAXBUF); - if (match(buffer,mask.c_str())) + if (match(u->second->MakeHost(),mask.c_str()),true) matches++; } float percent = ((float)matches / (float)clientlist->size()) * 100; -- cgit v1.2.3