diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_banredirect.cpp | 7 |
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++) { |