summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_banredirect.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp
index 2e2592541..1b9e361bf 100644
--- a/src/modules/m_banredirect.cpp
+++ b/src/modules/m_banredirect.cpp
@@ -75,6 +75,9 @@ class BanRedirect : public ModeWatcher
if (param.length() >= 2 && param[1] == ':')
return true;
+ if (param.find('#') == std::string::npos)
+ return true;
+
if(adding && (channel->bans.size() > static_cast<unsigned>(maxbans)))
{
source->WriteNumeric(478, "%s %s :Channel ban list for %s is full (maximum entries for this channel is %ld)", source->nick.c_str(), channel->name.c_str(), channel->name.c_str(), maxbans);
@@ -119,6 +122,14 @@ class BanRedirect : public ModeWatcher
mask[NICK].swap(mask[IDENT]);
}
+ if (!mask[NICK].empty() && mask[IDENT].empty() && mask[HOST].empty())
+ {
+ if (mask[NICK].find('.') != std::string::npos || mask[NICK].find(':') != std::string::npos)
+ {
+ mask[NICK].swap(mask[HOST]);
+ }
+ }
+
for(int i = 0; i < 3; i++)
{
if(mask[i].empty())