From 0131d2e3e06f697f82224cf139924dab658f4dcf Mon Sep 17 00:00:00 2001 From: om Date: Mon, 15 Jan 2007 21:27:30 +0000 Subject: 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 --- src/modules/m_banredirect.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/modules') 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++) { -- cgit v1.2.3