summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-21 18:52:07 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-21 18:52:07 +0000
commitb7e299c2e10d915d5e59df4cb3f54951c8daa999 (patch)
tree213ac57ce79632e485b6fde8a46712e29cccc971 /src/modules
parent3499c913a00d17e7f1ec28bf54b07aa4ded83ff7 (diff)
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
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_hostchange.cpp9
1 files changed, 5 insertions, 4 deletions
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;