diff options
author | Peter Powell <petpow@saberuk.com> | 2017-10-12 15:55:21 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2017-10-12 15:55:21 +0100 |
commit | a3e0768758ca68429a29d9c78ce672f2d938c6e7 (patch) | |
tree | a66b4c4f917d56e1cef8ffda450d535ea532be35 /src/modules | |
parent | c46f8a368c42f64284244f3d2dfc022a383294fa (diff) | |
parent | 0337b92c158fa662f04056343affd59315da78db (diff) |
Merge the latest changes from insp20 into master.
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_blockcaps.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_cgiirc.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_noctcp.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_sasl.cpp | 1 | ||||
-rw-r--r-- | src/modules/m_timedbans.cpp | 4 |
5 files changed, 6 insertions, 5 deletions
diff --git a/src/modules/m_blockcaps.cpp b/src/modules/m_blockcaps.cpp index 6e67cb309..c26d92caa 100644 --- a/src/modules/m_blockcaps.cpp +++ b/src/modules/m_blockcaps.cpp @@ -56,7 +56,7 @@ public: { if (target_type == TYPE_CHANNEL) { - if ((!IS_LOCAL(user)) || (text.length() < minlen)) + if ((!IS_LOCAL(user)) || (text.length() < minlen) || (text == "\1ACTION\1") || (text == "\1ACTION")) return MOD_RES_PASSTHRU; Channel* c = (Channel*)dest; diff --git a/src/modules/m_cgiirc.cpp b/src/modules/m_cgiirc.cpp index 305801b0a..d8dbe6da7 100644 --- a/src/modules/m_cgiirc.cpp +++ b/src/modules/m_cgiirc.cpp @@ -107,7 +107,7 @@ class CommandWebIRC : public SplitCommand realip.set(user, user->GetIPString()); // Check if we're happy with the provided hostname. If it's problematic then make sure we won't set a host later, just the IP - bool host_ok = (parameters[2].length() <= ServerInstance->Config->Limits.MaxHost); + bool host_ok = (parameters[2].length() <= ServerInstance->Config->Limits.MaxHost) && (parameters[2].find_first_not_of("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-") == std::string::npos); const std::string& newhost = (host_ok ? parameters[2] : parameters[3]); if (notify) diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp index 9dd9bf852..713964328 100644 --- a/src/modules/m_noctcp.cpp +++ b/src/modules/m_noctcp.cpp @@ -50,7 +50,7 @@ class ModuleNoCTCP : public Module if ((target_type == TYPE_CHANNEL) && (IS_LOCAL(user))) { Channel* c = (Channel*)dest; - if ((text.empty()) || (text[0] != '\001') || (!strncmp(text.c_str(),"\1ACTION ",8))) + if ((text.empty()) || (text[0] != '\001') || (!strncmp(text.c_str(),"\1ACTION ", 8)) || (text == "\1ACTION\1") || (text == "\1ACTION")) return MOD_RES_PASSTHRU; ModResult res; diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp index fe1438ccf..eedf968b4 100644 --- a/src/modules/m_sasl.cpp +++ b/src/modules/m_sasl.cpp @@ -174,6 +174,7 @@ class SaslAuthenticator parameterlist params; params.push_back(user->host); params.push_back(user->GetIPString()); + params.push_back(SSLIOHook::IsSSL(&user->eh) ? "S" : "P"); SendSASL(user, "*", 'H', params); } diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp index 44c6c4c4f..9890800e4 100644 --- a/src/modules/m_timedbans.cpp +++ b/src/modules/m_timedbans.cpp @@ -118,8 +118,8 @@ class CommandTban : public Command TimedBanList.push_back(T); // If halfop is loaded, send notice to halfops and above, otherwise send to ops and above - ModeHandler* mh = ServerInstance->Modes->FindMode('h', MODETYPE_CHANNEL); - char pfxchar = (mh && mh->name == "halfop") ? '%' : '@'; + PrefixMode* mh = ServerInstance->Modes->FindPrefixMode('h'); + char pfxchar = (mh && mh->name == "halfop") ? mh->GetPrefix() : '@'; channel->WriteAllExcept(ServerInstance->FakeClient, true, pfxchar, tmp, "NOTICE %s :%s added a timed ban on %s lasting for %ld seconds.", channel->name.c_str(), user->nick.c_str(), mask.c_str(), duration); return CMD_SUCCESS; |