aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-04-27 10:19:35 +0100
committerGravatar Sadie Powell2021-04-27 10:37:04 +0100
commit8526836cf598b49de6fe8e1cef7a169d3de481f8 (patch)
treef9ae452b867f69c6e09913db2dd84ae3fdaba7e3 /src/modules
parentUse parameter pack expansion instead of recursive calls. (diff)
parentFix SendNoticeInternal not having a NULL command variant. (diff)
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_regex_pcre.cpp2
-rw-r--r--src/modules/extra/m_regex_posix.cpp2
-rw-r--r--src/modules/extra/m_regex_re2.cpp2
-rw-r--r--src/modules/extra/m_regex_tre.cpp2
-rw-r--r--src/modules/m_allowinvite.cpp2
-rw-r--r--src/modules/m_callerid.cpp2
-rw-r--r--src/modules/m_censor.cpp7
-rw-r--r--src/modules/m_channelban.cpp2
-rw-r--r--src/modules/m_disable.cpp5
-rw-r--r--src/modules/m_geoban.cpp2
-rw-r--r--src/modules/m_globalload.cpp2
-rw-r--r--src/modules/m_hideoper.cpp5
-rw-r--r--src/modules/m_muteban.cpp2
-rw-r--r--src/modules/m_nopartmsg.cpp2
-rw-r--r--src/modules/m_realnameban.cpp2
-rw-r--r--src/modules/m_regex_glob.cpp2
-rw-r--r--src/modules/m_regex_stdlib.cpp2
-rw-r--r--src/modules/m_serverban.cpp2
18 files changed, 24 insertions, 23 deletions
diff --git a/src/modules/extra/m_regex_pcre.cpp b/src/modules/extra/m_regex_pcre.cpp
index fca30b4bf..2a0ff02a2 100644
--- a/src/modules/extra/m_regex_pcre.cpp
+++ b/src/modules/extra/m_regex_pcre.cpp
@@ -81,7 +81,7 @@ class ModuleRegexPCRE : public Module
public:
ModuleRegexPCRE()
- : Module(VF_VENDOR, "Provides a regular expression engine which uses the PCRE library.")
+ : Module(VF_VENDOR, "Provides the pcre regular expression engine which uses the PCRE library.")
, regex(this, "pcre")
{
}
diff --git a/src/modules/extra/m_regex_posix.cpp b/src/modules/extra/m_regex_posix.cpp
index be3c28093..ee1744f06 100644
--- a/src/modules/extra/m_regex_posix.cpp
+++ b/src/modules/extra/m_regex_posix.cpp
@@ -75,7 +75,7 @@ class ModuleRegexPOSIX : public Module
public:
ModuleRegexPOSIX()
- : Module(VF_VENDOR, "Provides a regular expression engine which uses the POSIX.2 regular expression matching system.")
+ : Module(VF_VENDOR, "Provides the posix regular expression engine which uses the POSIX.2 regular expression matching system.")
, regex(this, "posix")
{
}
diff --git a/src/modules/extra/m_regex_re2.cpp b/src/modules/extra/m_regex_re2.cpp
index b86efd91a..a6ae1cf44 100644
--- a/src/modules/extra/m_regex_re2.cpp
+++ b/src/modules/extra/m_regex_re2.cpp
@@ -67,7 +67,7 @@ class ModuleRegexRE2 : public Module
public:
ModuleRegexRE2()
- : Module(VF_VENDOR, "Provides a regular expression engine which uses the RE2 library.")
+ : Module(VF_VENDOR, "Provides the re2 regular expression engine which uses the RE2 library.")
, regex(this, "re2")
{
}
diff --git a/src/modules/extra/m_regex_tre.cpp b/src/modules/extra/m_regex_tre.cpp
index 2285adaa6..eb991a9f1 100644
--- a/src/modules/extra/m_regex_tre.cpp
+++ b/src/modules/extra/m_regex_tre.cpp
@@ -82,7 +82,7 @@ class ModuleRegexTRE : public Module
public:
ModuleRegexTRE()
- : Module(VF_VENDOR, "Provides a regular expression engine which uses the TRE library.")
+ : Module(VF_VENDOR, "Provides the tre regular expression engine which uses the TRE library.")
, regex(this, "tre")
{
}
diff --git a/src/modules/m_allowinvite.cpp b/src/modules/m_allowinvite.cpp
index 298c0d86a..0b8a4456b 100644
--- a/src/modules/m_allowinvite.cpp
+++ b/src/modules/m_allowinvite.cpp
@@ -34,7 +34,7 @@ class ModuleAllowInvite : public Module
public:
ModuleAllowInvite()
- : Module(VF_VENDOR, "Adds channel mode A (allowinvite) which allows unprivileged users to use the /INVITE command and extended ban A which bans specific masks from using the /INVITE command.")
+ : Module(VF_VENDOR, "Adds channel mode A (allowinvite) which allows unprivileged users to use the /INVITE command and extended ban A: which bans specific masks from using the /INVITE command.")
, extban(this, "blockinvite", 'A')
, ni(this, "allowinvite", 'A')
{
diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp
index cea80ed1d..013055331 100644
--- a/src/modules/m_callerid.cpp
+++ b/src/modules/m_callerid.cpp
@@ -386,7 +386,7 @@ class ModuleCallerID
public:
ModuleCallerID()
- : Module(VF_VENDOR | VF_COMMON, "Provides user mode g (bot) which allows users to require that other users are on their whitelist before messaging them.")
+ : Module(VF_VENDOR | VF_COMMON, "Provides user mode g (callerid) which allows users to require that other users are on their whitelist before messaging them.")
, CTCTags::EventListener(this)
, ISupport::EventListener(this)
, cmd(this)
diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp
index d3640a802..19fd55229 100644
--- a/src/modules/m_censor.cpp
+++ b/src/modules/m_censor.cpp
@@ -28,13 +28,13 @@
#include "inspircd.h"
#include "modules/exemption.h"
-typedef insp::flat_map<std::string, std::string, irc::insensitive_swo> censor_t;
+typedef insp::flat_map<std::string, std::string, irc::insensitive_swo> CensorMap;
class ModuleCensor : public Module
{
private:
CheckExemption::EventProvider exemptionprov;
- censor_t censors;
+ CensorMap censors;
SimpleUserModeHandler cu;
SimpleChannelModeHandler cc;
@@ -106,8 +106,7 @@ class ModuleCensor : public Module
* reload our config file on rehash - we must destroy and re-allocate the classes
* to call the constructor again and re-read our data.
*/
- censor_t newcensors;
-
+ CensorMap newcensors;
for (const auto& [_, tag] : ServerInstance->Config->ConfTags("badword"))
{
const std::string text = tag->getString("text");
diff --git a/src/modules/m_channelban.cpp b/src/modules/m_channelban.cpp
index 099660f6f..c016f3dc9 100644
--- a/src/modules/m_channelban.cpp
+++ b/src/modules/m_channelban.cpp
@@ -64,7 +64,7 @@ class ModuleBadChannelExtban
public:
ModuleBadChannelExtban()
- : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the j: extended ban which checks whether users are in a channel matching the specified glob pattern.")
+ : Module(VF_VENDOR | VF_OPTCOMMON, "Adds extended ban j: which checks whether users are in a channel matching the specified glob pattern.")
, extban(this)
{
}
diff --git a/src/modules/m_disable.cpp b/src/modules/m_disable.cpp
index ddfea5811..04e18eb90 100644
--- a/src/modules/m_disable.cpp
+++ b/src/modules/m_disable.cpp
@@ -173,8 +173,9 @@ class ModuleDisable : public Module
{
// The server administrator has specified that disabled modes should be
// treated as if they do not exist.
- user->WriteNumeric(change.mh->GetModeType() == MODETYPE_CHANNEL ? ERR_UNKNOWNMODE : ERR_UNKNOWNSNOMASK,
- change.mh->GetModeChar(), "is an unknown mode character");
+ int numeric = (change.mh->GetModeType() == MODETYPE_CHANNEL ? ERR_UNKNOWNMODE : ERR_UNKNOWNSNOMASK);
+ const char* typestr = (change.mh->GetModeType() == MODETYPE_CHANNEL ? "channel" : "user");
+ user->WriteNumeric(numeric, change.mh->GetModeChar(), InspIRCd::Format("is not a recognised %s mode.", typestr));
return MOD_RES_DENY;
}
diff --git a/src/modules/m_geoban.cpp b/src/modules/m_geoban.cpp
index 4e34a4589..890508a6d 100644
--- a/src/modules/m_geoban.cpp
+++ b/src/modules/m_geoban.cpp
@@ -62,7 +62,7 @@ class ModuleGeoBan
public:
ModuleGeoBan()
- : Module(VF_VENDOR | VF_OPTCOMMON, "Adds extended ban G which matches against two letter country codes.")
+ : Module(VF_VENDOR | VF_OPTCOMMON, "Adds extended ban G: which matches against two letter country codes.")
, Whois::EventListener(this)
, geoapi(this)
, extban(this, geoapi)
diff --git a/src/modules/m_globalload.cpp b/src/modules/m_globalload.cpp
index 1968c16d5..730c1d8c8 100644
--- a/src/modules/m_globalload.cpp
+++ b/src/modules/m_globalload.cpp
@@ -141,7 +141,7 @@ class CommandGReloadModule : public Command
}
else
{
- user->WriteRemoteNumeric(RPL_LOADEDMODULE, parameters[0], "Could not find module by that name");
+ user->WriteRemoteNumeric(ERR_CANTUNLOADMODULE, parameters[0], "Could not find a loaded module by that name");
return CmdResult::FAILURE;
}
}
diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp
index 4afc8fea0..5d63e14d1 100644
--- a/src/modules/m_hideoper.cpp
+++ b/src/modules/m_hideoper.cpp
@@ -153,8 +153,9 @@ class ModuleHideOper
if (!oper->server->IsService() && (stats.GetSource()->IsOper() || !oper->IsModeSet(hm)))
{
LocalUser* lu = IS_LOCAL(oper);
- stats.AddRow(249, oper->nick + " (" + oper->ident + "@" + oper->GetDisplayedHost() + ") Idle: " +
- (lu ? ConvToStr(ServerInstance->Time() - lu->idle_lastmsg) + " secs" : "unavailable"));
+ const std::string idle = lu ? InspIRCd::DurationString(ServerInstance->Time() - lu->idle_lastmsg) : "unavailable";
+ stats.AddRow(249, InspIRCd::Format("%s (%s@%s) Idle: %s", oper->nick.c_str(),
+ oper->ident.c_str(), oper->GetDisplayedHost().c_str(), idle.c_str()));
count++;
}
}
diff --git a/src/modules/m_muteban.cpp b/src/modules/m_muteban.cpp
index 22ac70565..cb232d136 100644
--- a/src/modules/m_muteban.cpp
+++ b/src/modules/m_muteban.cpp
@@ -36,7 +36,7 @@ class ModuleQuietBan
public:
ModuleQuietBan()
- : Module(VF_VENDOR | VF_OPTCOMMON, "Adds extended ban m which bans specific masks from speaking in a channel.")
+ : Module(VF_VENDOR | VF_OPTCOMMON, "Adds extended ban m: which bans specific masks from speaking in a channel.")
, CTCTags::EventListener(this)
, extban(this, "mute", 'm')
{
diff --git a/src/modules/m_nopartmsg.cpp b/src/modules/m_nopartmsg.cpp
index df835e9cf..5d125a96d 100644
--- a/src/modules/m_nopartmsg.cpp
+++ b/src/modules/m_nopartmsg.cpp
@@ -33,7 +33,7 @@ class ModulePartMsgBan : public Module
public:
ModulePartMsgBan()
- : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the p: extended ban which blocks the part message of matching users.")
+ : Module(VF_VENDOR | VF_OPTCOMMON, "Adds extended ban p: which blocks the part message of matching users.")
, extban(this, "partmsg", 'p')
{
}
diff --git a/src/modules/m_realnameban.cpp b/src/modules/m_realnameban.cpp
index 581c8aa7e..bfaa7cd53 100644
--- a/src/modules/m_realnameban.cpp
+++ b/src/modules/m_realnameban.cpp
@@ -75,7 +75,7 @@ class ModuleGecosBan
public:
ModuleGecosBan()
- : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the r: extended ban which checks whether users have a real name matching the specified glob pattern.")
+ : Module(VF_VENDOR | VF_OPTCOMMON, "Adds extended ban r: which checks whether users have a real name matching the specified glob pattern.")
, maskextban(this)
, realextban(this)
{
diff --git a/src/modules/m_regex_glob.cpp b/src/modules/m_regex_glob.cpp
index e6c67ac67..ce8f9a6dd 100644
--- a/src/modules/m_regex_glob.cpp
+++ b/src/modules/m_regex_glob.cpp
@@ -48,7 +48,7 @@ class ModuleRegexGlob : public Module
public:
ModuleRegexGlob()
- : Module(VF_VENDOR, "Provides a regular expression engine which uses the built-in glob matching system.")
+ : Module(VF_VENDOR, "Provides the glob regular expression engine which uses the built-in glob matching system.")
, regex(this, "glob")
{
}
diff --git a/src/modules/m_regex_stdlib.cpp b/src/modules/m_regex_stdlib.cpp
index e59f18f46..2f758c018 100644
--- a/src/modules/m_regex_stdlib.cpp
+++ b/src/modules/m_regex_stdlib.cpp
@@ -80,7 +80,7 @@ class ModuleRegexStdLib : public Module
public:
ModuleRegexStdLib()
- : Module(VF_VENDOR, "Provides a regular expression engine which uses the C++11 std::regex regular expression matching system.")
+ : Module(VF_VENDOR, "Provides the stdregex regular expression engine which uses the C++11 std::regex regular expression matching system.")
, regex(this)
{
}
diff --git a/src/modules/m_serverban.cpp b/src/modules/m_serverban.cpp
index 97d4b3962..9af3f1dd0 100644
--- a/src/modules/m_serverban.cpp
+++ b/src/modules/m_serverban.cpp
@@ -49,7 +49,7 @@ class ModuleServerBan
public:
ModuleServerBan()
- : Module(VF_VENDOR | VF_OPTCOMMON, "Adds the s: extended ban which check whether users are on a server matching the specified glob pattern.")
+ : Module(VF_VENDOR | VF_OPTCOMMON, "Adds extended ban s: which check whether users are on a server matching the specified glob pattern.")
, extban(this)
{
}