]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Implement feature in bug #395 reported by stealth, and tidy up a bit
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 21 Aug 2007 18:52:07 +0000 (18:52 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 21 Aug 2007 18:52:07 +0000 (18:52 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7789 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_hostchange.cpp

index b2db6d00427f05d83d27db087bd32e2cec92406c..4a1e501a3e0d984ac8a15c9dcfc7fecdb32f2287 100644 (file)
@@ -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;