summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2007-01-15 21:27:30 +0000
committerom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2007-01-15 21:27:30 +0000
commit0131d2e3e06f697f82224cf139924dab658f4dcf (patch)
tree58bb1be8f5dae316c6a2c0b9309e53023c9fdbe9 /src
parent289340ebf82bc4f00ac2f47084feea5050021b80 (diff)
Fix some differences between how this expands partial banmasks with how the core does it. (Obviously my way was right and the core was silly ;[)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6350 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_banredirect.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp
index a185b8c48..ba5b7ca0e 100644
--- a/src/modules/m_banredirect.cpp
+++ b/src/modules/m_banredirect.cpp
@@ -96,6 +96,13 @@ class BanRedirect : public ModeWatcher
{
mask[current].assign(start_pos, param.end());
}
+
+ /* nick@host wants to be changed to *!nick@host rather than nick!*@host... */
+ if(mask[NICK].length() && mask[HOST].length() && mask[IDENT].empty())
+ {
+ /* std::string::swap() is fast - it runs in constant time */
+ mask[NICK].swap(mask[IDENT]);
+ }
for(int i = 0; i < 3; i++)
{