diff options
author | om <om@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-15 08:11:34 +0000 |
---|---|---|
committer | om <om@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-15 08:11:34 +0000 |
commit | 9d9c0553476e515550d9aa26e49b880f42dcc85e (patch) | |
tree | ddad603bbed5504b0154c4cf7848d810c9cb0321 /src | |
parent | 6b23783b71e98bae6aced7144c6730f028873cb6 (diff) |
Prepend nick to user->MakeHostIP().
Maybe we should have a GetFullIPHost() or something to match GetFullHost() and GetFullRealHost?
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6346 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_banredirect.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp index dac9b9d43..269c22db4 100644 --- a/src/modules/m_banredirect.cpp +++ b/src/modules/m_banredirect.cpp @@ -97,7 +97,7 @@ class BanRedirect : public ModeWatcher } } - param.assign(mask[NICK]).append("!").append(mask[IDENT]).append("@").append(mask[HOST]); + param.assign(mask[NICK]).append(1, '!').append(mask[IDENT]).append(1, '@').append(mask[HOST]); Srv->Log(DEBUG, "mask[NICK] = '%s', mask[IDENT] = '%s', mask[HOST] = '%s', mask[CHAN] = '%s'", mask[NICK].c_str(), mask[IDENT].c_str(), mask[HOST].c_str(), mask[CHAN].c_str()); @@ -222,7 +222,12 @@ class ModuleBanRedirect : public Module { /* We actually had some ban redirects to check */ - std::string ipmask(user->MakeHostIP()); + /* This was replaced with user->MakeHostIP() when I had a snprintf(), but MakeHostIP() doesn't seem to add the nick. + * Maybe we should have a GetFullIPHost() or something to match GetFullHost() and GetFullRealHost? + */ + std::string ipmask(user->nick); + ipmask.append(1, '!').append(user->MakeHostIP()); + Srv->Log(DEBUG, "Matching against %s, %s and %s", user->GetFullRealHost(), user->GetFullHost(), ipmask.c_str()); for(BanRedirectList::iterator redir = redirects->begin(); redir != redirects->end(); redir++) { |