From b7e299c2e10d915d5e59df4cb3f54951c8daa999 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 21 Aug 2007 18:52:07 +0000 Subject: Implement feature in bug #395 reported by stealth, and tidy up a bit git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7789 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_hostchange.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_hostchange.cpp b/src/modules/m_hostchange.cpp index b2db6d004..4a1e501a3 100644 --- a/src/modules/m_hostchange.cpp +++ b/src/modules/m_hostchange.cpp @@ -15,6 +15,7 @@ #include "users.h" #include "channels.h" #include "modules.h" +#include "wildcard.h" /* $ModDesc: Provides masking of user hostnames in a different way to m_cloaking */ @@ -100,13 +101,13 @@ class ModuleHostChange : public Module { for (hostchanges_t::iterator i = hostchanges.begin(); i != hostchanges.end(); i++) { - if (ServerInstance->MatchText(std::string(user->ident)+"@"+std::string(user->host),i->first)) + if (((match(user->GetFullRealHost(),i->first.c_str(),true)) || (match(user->MakeHostIP(),i->first.c_str())))) { - Host* h = (Host*)i->second; + Host* h = i->second; - if (!i->second->ports.empty()) + if (!h->ports.empty()) { - irc::portparser portrange(i->second->ports, false); + irc::portparser portrange(h->ports, false); long portno = -1; bool foundany = false; -- cgit v1.2.3