summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-02-27 10:40:23 +0000
committerSadie Powell <sadie@witchery.services>2024-02-27 10:48:55 +0000
commitb5b3c744778ed0cbceb03f2f8dbbec33d2fd0e94 (patch)
treee6d8a7c143a11035be55ffffcdc97395eb5b4e25 /modules
parent73d4ac6de04a1035ac36182d3f269cc938c6bc19 (diff)
Make functions that don't use `this` static.
Diffstat (limited to 'modules')
-rw-r--r--modules/botserv/bs_info.cpp2
-rw-r--r--modules/botserv/bs_kick.cpp2
-rw-r--r--modules/chanserv/cs_access.cpp2
-rw-r--r--modules/chanserv/cs_clone.cpp10
-rw-r--r--modules/chanserv/cs_entrymsg.cpp2
-rw-r--r--modules/chanserv/cs_flags.cpp2
-rw-r--r--modules/chanserv/cs_mode.cpp2
-rw-r--r--modules/chanserv/cs_seen.cpp4
-rw-r--r--modules/chanserv/cs_updown.cpp4
-rw-r--r--modules/chanstats.cpp4
-rw-r--r--modules/dns.cpp4
-rw-r--r--modules/encryption/enc_bcrypt.cpp2
-rw-r--r--modules/encryption/enc_md5.cpp4
-rw-r--r--modules/hostserv/hs_request.cpp2
-rw-r--r--modules/hostserv/hs_set.cpp2
-rw-r--r--modules/memoserv/memoserv.cpp2
-rw-r--r--modules/nickserv/ns_access.cpp2
-rw-r--r--modules/nickserv/ns_ajoin.cpp2
-rw-r--r--modules/nickserv/ns_cert.cpp2
-rw-r--r--modules/nickserv/ns_maxemail.cpp2
-rw-r--r--modules/operserv/os_defcon.cpp2
-rw-r--r--modules/operserv/os_dns.cpp4
-rw-r--r--modules/operserv/os_ignore.cpp4
-rw-r--r--modules/operserv/os_oper.cpp2
-rw-r--r--modules/operserv/os_session.cpp4
-rw-r--r--modules/operserv/os_stats.cpp6
-rw-r--r--modules/protocol/bahamut.cpp2
-rw-r--r--modules/protocol/hybrid.cpp2
-rw-r--r--modules/protocol/inspircd.cpp14
-rw-r--r--modules/protocol/ngircd.cpp2
-rw-r--r--modules/protocol/plexus.cpp2
-rw-r--r--modules/protocol/ratbox.cpp4
-rw-r--r--modules/protocol/solanum.cpp2
-rw-r--r--modules/redis.cpp2
-rw-r--r--modules/xmlrpc_main.cpp12
35 files changed, 61 insertions, 61 deletions
diff --git a/modules/botserv/bs_info.cpp b/modules/botserv/bs_info.cpp
index e42ad23b8..c8e05577b 100644
--- a/modules/botserv/bs_info.cpp
+++ b/modules/botserv/bs_info.cpp
@@ -15,7 +15,7 @@ class CommandBSInfo final
: public Command
{
private:
- void send_bot_channels(std::vector<Anope::string> &buffers, const BotInfo *bi)
+ static void send_bot_channels(std::vector<Anope::string> &buffers, const BotInfo *bi)
{
Anope::string buf;
for (const auto &[_, ci] : *RegisteredChannelList)
diff --git a/modules/botserv/bs_kick.cpp b/modules/botserv/bs_kick.cpp
index 5888fa302..29c8cb598 100644
--- a/modules/botserv/bs_kick.cpp
+++ b/modules/botserv/bs_kick.cpp
@@ -1091,7 +1091,7 @@ class BSKick final
}
}
- void bot_kick(ChannelInfo *ci, User *u, const char *message, ...) ATTR_FORMAT(4, 5)
+ static void bot_kick(ChannelInfo *ci, User *u, const char *message, ...) ATTR_FORMAT(3, 4)
{
va_list args;
char buf[1024];
diff --git a/modules/chanserv/cs_access.cpp b/modules/chanserv/cs_access.cpp
index 047ff4ec1..3d2c3c8d6 100644
--- a/modules/chanserv/cs_access.cpp
+++ b/modules/chanserv/cs_access.cpp
@@ -713,7 +713,7 @@ class CommandCSLevels final
source.Reply(_("Setting \002%s\002 not known. Type \002%s%s HELP LEVELS\002 for a list of valid settings."), what.c_str(), Config->StrictPrivmsg.c_str(), source.service->nick.c_str());
}
- void DoList(CommandSource &source, ChannelInfo *ci)
+ static void DoList(CommandSource &source, ChannelInfo *ci)
{
source.Reply(_("Access level settings for channel %s:"), ci->name.c_str());
diff --git a/modules/chanserv/cs_clone.cpp b/modules/chanserv/cs_clone.cpp
index 79db9fd57..5b088154d 100644
--- a/modules/chanserv/cs_clone.cpp
+++ b/modules/chanserv/cs_clone.cpp
@@ -15,13 +15,13 @@
class CommandCSClone final
: public Command
{
- void CopySetting(ChannelInfo *ci, ChannelInfo *target_ci, const Anope::string &setting)
+ static void CopySetting(ChannelInfo *ci, ChannelInfo *target_ci, const Anope::string &setting)
{
if (ci->HasExt(setting))
target_ci->Extend<bool>(setting);
}
- void CopyAccess(CommandSource &source, ChannelInfo *ci, ChannelInfo *target_ci)
+ static void CopyAccess(CommandSource &source, ChannelInfo *ci, ChannelInfo *target_ci)
{
std::set<Anope::string> masks;
unsigned access_max = Config->GetModule("chanserv")->Get<unsigned>("accessmax", "1024");
@@ -58,7 +58,7 @@ class CommandCSClone final
source.Reply(_("%d access entries from \002%s\002 have been cloned to \002%s\002."), count, ci->name.c_str(), target_ci->name.c_str());
}
- void CopyAkick(CommandSource &source, ChannelInfo *ci, ChannelInfo *target_ci)
+ static void CopyAkick(CommandSource &source, ChannelInfo *ci, ChannelInfo *target_ci)
{
target_ci->ClearAkick();
for (unsigned i = 0; i < ci->GetAkickCount(); ++i)
@@ -73,7 +73,7 @@ class CommandCSClone final
source.Reply(_("All akick entries from \002%s\002 have been cloned to \002%s\002."), ci->name.c_str(), target_ci->name.c_str());
}
- void CopyBadwords(CommandSource &source, ChannelInfo *ci, ChannelInfo *target_ci)
+ static void CopyBadwords(CommandSource &source, ChannelInfo *ci, ChannelInfo *target_ci)
{
BadWords *target_badwords = target_ci->Require<BadWords>("badwords"),
*badwords = ci->Require<BadWords>("badwords");
@@ -98,7 +98,7 @@ class CommandCSClone final
source.Reply(_("All badword entries from \002%s\002 have been cloned to \002%s\002."), ci->name.c_str(), target_ci->name.c_str());
}
- void CopyLevels(CommandSource &source, ChannelInfo *ci, ChannelInfo *target_ci)
+ static void CopyLevels(CommandSource &source, ChannelInfo *ci, ChannelInfo *target_ci)
{
for (const auto &[priv, level] : ci->GetLevelEntries())
{
diff --git a/modules/chanserv/cs_entrymsg.cpp b/modules/chanserv/cs_entrymsg.cpp
index df1f04581..03e4b22de 100644
--- a/modules/chanserv/cs_entrymsg.cpp
+++ b/modules/chanserv/cs_entrymsg.cpp
@@ -104,7 +104,7 @@ class CommandEntryMessage final
: public Command
{
private:
- void DoList(CommandSource &source, ChannelInfo *ci)
+ static void DoList(CommandSource &source, ChannelInfo *ci)
{
EntryMessageList *messages = ci->Require<EntryMessageList>("entrymsg");
diff --git a/modules/chanserv/cs_flags.cpp b/modules/chanserv/cs_flags.cpp
index 0c1e088da..b1cb02edd 100644
--- a/modules/chanserv/cs_flags.cpp
+++ b/modules/chanserv/cs_flags.cpp
@@ -294,7 +294,7 @@ class CommandCSFlags final
source.Reply(_("Flags for \002%s\002 on %s set to +\002%s\002"), access->Mask().c_str(), ci->name.c_str(), access->AccessSerialize().c_str());
}
- void DoList(CommandSource &source, ChannelInfo *ci, const std::vector<Anope::string> &params)
+ static void DoList(CommandSource &source, ChannelInfo *ci, const std::vector<Anope::string> &params)
{
const Anope::string &arg = params.size() > 2 ? params[2] : "";
diff --git a/modules/chanserv/cs_mode.cpp b/modules/chanserv/cs_mode.cpp
index 3aa8e709d..631196c7a 100644
--- a/modules/chanserv/cs_mode.cpp
+++ b/modules/chanserv/cs_mode.cpp
@@ -247,7 +247,7 @@ Serializable *ModeLockImpl::Unserialize(Serializable *obj, Serialize::Data &data
class CommandCSMode final
: public Command
{
- bool CanSet(CommandSource &source, ChannelInfo *ci, ChannelMode *cm, bool self)
+ static bool CanSet(CommandSource &source, ChannelInfo *ci, ChannelMode *cm, bool self)
{
if (!ci || !cm || cm->type != MODE_STATUS)
return false;
diff --git a/modules/chanserv/cs_seen.cpp b/modules/chanserv/cs_seen.cpp
index ff57949c4..e18434d3e 100644
--- a/modules/chanserv/cs_seen.cpp
+++ b/modules/chanserv/cs_seen.cpp
@@ -185,7 +185,7 @@ public:
class CommandSeen final
: public Command
{
- void SimpleSeen(CommandSource &source, const std::vector<Anope::string> &params)
+ static void SimpleSeen(CommandSource &source, const std::vector<Anope::string> &params)
{
if (!source.c || !source.c->ci)
{
@@ -440,7 +440,7 @@ public:
}
private:
- void UpdateUser(const User *u, const TypeInfo Type, const Anope::string &nick, const Anope::string &nick2, const Anope::string &channel, const Anope::string &message)
+ static void UpdateUser(const User *u, const TypeInfo Type, const Anope::string &nick, const Anope::string &nick2, const Anope::string &channel, const Anope::string &message)
{
if (simple || !u->server->IsSynced())
return;
diff --git a/modules/chanserv/cs_updown.cpp b/modules/chanserv/cs_updown.cpp
index 24242a0c3..76db3452a 100644
--- a/modules/chanserv/cs_updown.cpp
+++ b/modules/chanserv/cs_updown.cpp
@@ -14,7 +14,7 @@
class CommandCSUp final
: public Command
{
- void SetModes(User *u, Channel *c)
+ static void SetModes(User *u, Channel *c)
{
if (!c->ci)
return;
@@ -133,7 +133,7 @@ public:
class CommandCSDown final
: public Command
{
- void RemoveAll(User *u, Channel *c)
+ static void RemoveAll(User *u, Channel *c)
{
ChanUserContainer *cu = c->FindUser(u);
if (cu != NULL)
diff --git a/modules/chanstats.cpp b/modules/chanstats.cpp
index b2887dfd5..81c826739 100644
--- a/modules/chanstats.cpp
+++ b/modules/chanstats.cpp
@@ -189,14 +189,14 @@ class MChanstats final
sql->Run(&sqlinterface, q);
}
- size_t CountWords(const Anope::string &msg)
+ static size_t CountWords(const Anope::string &msg)
{
size_t words = 0;
for (size_t pos = 0; pos != Anope::string::npos; pos = msg.find(" ", pos+1))
words++;
return words;
}
- size_t CountSmileys(const Anope::string &msg, const Anope::string &smileylist)
+ static size_t CountSmileys(const Anope::string &msg, const Anope::string &smileylist)
{
size_t smileys = 0;
spacesepstream sep(smileylist);
diff --git a/modules/dns.cpp b/modules/dns.cpp
index 0430f0817..c16a390a1 100644
--- a/modules/dns.cpp
+++ b/modules/dns.cpp
@@ -31,7 +31,7 @@ class Packet final
return name.find_first_not_of("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-") == Anope::string::npos;
}
- void PackName(unsigned char *output, unsigned short output_size, unsigned short &pos, const Anope::string &name)
+ static void PackName(unsigned char *output, unsigned short output_size, unsigned short &pos, const Anope::string &name)
{
if (pos + name.length() + 2 > output_size)
throw SocketException("Unable to pack name");
@@ -51,7 +51,7 @@ class Packet final
output[pos++] = 0;
}
- Anope::string UnpackName(const unsigned char *input, unsigned short input_size, unsigned short &pos)
+ static Anope::string UnpackName(const unsigned char *input, unsigned short input_size, unsigned short &pos)
{
Anope::string name;
unsigned short pos_ptr = pos, lowest_ptr = input_size;
diff --git a/modules/encryption/enc_bcrypt.cpp b/modules/encryption/enc_bcrypt.cpp
index 3dea3f2c6..76809ed4e 100644
--- a/modules/encryption/enc_bcrypt.cpp
+++ b/modules/encryption/enc_bcrypt.cpp
@@ -30,7 +30,7 @@ class EBCRYPT final
return salt;
}
- Anope::string Generate(const Anope::string &data, const Anope::string &salt)
+ static Anope::string Generate(const Anope::string &data, const Anope::string &salt)
{
char hash[64];
_crypt_blowfish_rn(data.c_str(), salt.c_str(), hash, sizeof(hash));
diff --git a/modules/encryption/enc_md5.cpp b/modules/encryption/enc_md5.cpp
index 9bad9ade6..c5c9b857a 100644
--- a/modules/encryption/enc_md5.cpp
+++ b/modules/encryption/enc_md5.cpp
@@ -208,7 +208,7 @@ class MD5Context final
/* Encodes input (unsigned) into output (unsigned char). Assumes len is
* a multiple of 4.
*/
- void Encode(unsigned char *output, unsigned *input, unsigned len)
+ static void Encode(unsigned char *output, unsigned *input, unsigned len)
{
for (unsigned i = 0, j = 0; j < len; ++i, j += 4)
{
@@ -222,7 +222,7 @@ class MD5Context final
/* Decodes input (unsigned char) into output (unsigned). Assumes len is
* a multiple of 4.
*/
- void Decode(unsigned *output, const unsigned char *input, unsigned len)
+ static void Decode(unsigned *output, const unsigned char *input, unsigned len)
{
for (unsigned i = 0, j = 0; j < len; ++i, j += 4)
output[i] = static_cast<unsigned>(input[j]) | (static_cast<unsigned>(input[j + 1]) << 8) | (static_cast<unsigned>(input[j + 2]) << 16) | (static_cast<unsigned>(input[j + 3]) << 24);
diff --git a/modules/hostserv/hs_request.cpp b/modules/hostserv/hs_request.cpp
index dac9fc738..be6831ff8 100644
--- a/modules/hostserv/hs_request.cpp
+++ b/modules/hostserv/hs_request.cpp
@@ -67,7 +67,7 @@ struct HostRequest final
class CommandHSRequest final
: public Command
{
- bool isvalidchar(char c)
+ static bool isvalidchar(char c)
{
return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '.' || c == '-';
}
diff --git a/modules/hostserv/hs_set.cpp b/modules/hostserv/hs_set.cpp
index f923057c2..665e24467 100644
--- a/modules/hostserv/hs_set.cpp
+++ b/modules/hostserv/hs_set.cpp
@@ -108,7 +108,7 @@ public:
class CommandHSSetAll final
: public Command
{
- void Sync(const NickAlias *na)
+ static void Sync(const NickAlias *na)
{
if (!na || !na->HasVhost())
return;
diff --git a/modules/memoserv/memoserv.cpp b/modules/memoserv/memoserv.cpp
index 0961017e0..45642b46d 100644
--- a/modules/memoserv/memoserv.cpp
+++ b/modules/memoserv/memoserv.cpp
@@ -17,7 +17,7 @@ class MemoServCore final
{
Reference<BotInfo> MemoServ;
- bool SendMemoMail(NickCore *nc, MemoInfo *mi, Memo *m)
+ static bool SendMemoMail(NickCore *nc, MemoInfo *mi, Memo *m)
{
Anope::string subject = Language::Translate(nc, Config->GetBlock("mail")->Get<const Anope::string>("memo_subject").c_str()),
message = Language::Translate(Config->GetBlock("mail")->Get<const Anope::string>("memo_message").c_str());
diff --git a/modules/nickserv/ns_access.cpp b/modules/nickserv/ns_access.cpp
index 1e0c99ce4..c8d391751 100644
--- a/modules/nickserv/ns_access.cpp
+++ b/modules/nickserv/ns_access.cpp
@@ -75,7 +75,7 @@ private:
return;
}
- void DoList(CommandSource &source, NickCore *nc, const Anope::string &mask)
+ static void DoList(CommandSource &source, NickCore *nc, const Anope::string &mask)
{
unsigned i, end;
diff --git a/modules/nickserv/ns_ajoin.cpp b/modules/nickserv/ns_ajoin.cpp
index a21f66fd0..f6e716a36 100644
--- a/modules/nickserv/ns_ajoin.cpp
+++ b/modules/nickserv/ns_ajoin.cpp
@@ -91,7 +91,7 @@ AJoinList::~AJoinList()
class CommandNSAJoin final
: public Command
{
- void DoList(CommandSource &source, NickCore *nc)
+ static void DoList(CommandSource &source, NickCore *nc)
{
AJoinList *channels = nc->Require<AJoinList>("ajoinlist");
diff --git a/modules/nickserv/ns_cert.cpp b/modules/nickserv/ns_cert.cpp
index 4f1b4ba57..88ff1ecaa 100644
--- a/modules/nickserv/ns_cert.cpp
+++ b/modules/nickserv/ns_cert.cpp
@@ -250,7 +250,7 @@ private:
source.Reply(_("\002%s\002 deleted from %s's certificate list."), certfp.c_str(), nc->display.c_str());
}
- void DoList(CommandSource &source, const NickCore *nc)
+ static void DoList(CommandSource &source, const NickCore *nc)
{
NSCertList *cl = nc->GetExt<NSCertList>("certificates");
diff --git a/modules/nickserv/ns_maxemail.cpp b/modules/nickserv/ns_maxemail.cpp
index 135381a59..342ba3c3d 100644
--- a/modules/nickserv/ns_maxemail.cpp
+++ b/modules/nickserv/ns_maxemail.cpp
@@ -18,7 +18,7 @@ class NSMaxEmail final
bool clean = false;
/* strip dots from username, and remove anything after the first + */
- Anope::string CleanMail(const Anope::string &email)
+ static Anope::string CleanMail(const Anope::string &email)
{
size_t host = email.find('@');
if (host == Anope::string::npos)
diff --git a/modules/operserv/os_defcon.cpp b/modules/operserv/os_defcon.cpp
index 3bf057877..dbb0edb69 100644
--- a/modules/operserv/os_defcon.cpp
+++ b/modules/operserv/os_defcon.cpp
@@ -150,7 +150,7 @@ public:
class CommandOSDefcon final
: public Command
{
- void SendLevels(CommandSource &source)
+ static void SendLevels(CommandSource &source)
{
if (DConfig.Check(DEFCON_NO_NEW_CHANNELS))
source.Reply(_("* No new channel registrations"));
diff --git a/modules/operserv/os_dns.cpp b/modules/operserv/os_dns.cpp
index b2fb17be2..99d01e7b7 100644
--- a/modules/operserv/os_dns.cpp
+++ b/modules/operserv/os_dns.cpp
@@ -209,7 +209,7 @@ public:
class CommandOSDNS final
: public Command
{
- void DisplayPoolState(CommandSource &source)
+ static void DisplayPoolState(CommandSource &source)
{
if (dns_servers->empty())
{
@@ -564,7 +564,7 @@ class CommandOSDNS final
source.Reply(_("IP %s does not exist for %s."), params[2].c_str(), s->GetName().c_str());
}
- void OnSet(CommandSource &source, const std::vector<Anope::string> &params)
+ static void OnSet(CommandSource &source, const std::vector<Anope::string> &params)
{
DNSServer *s = DNSServer::Find(params[1]);
diff --git a/modules/operserv/os_ignore.cpp b/modules/operserv/os_ignore.cpp
index b777158e5..e4cff0d44 100644
--- a/modules/operserv/os_ignore.cpp
+++ b/modules/operserv/os_ignore.cpp
@@ -161,7 +161,7 @@ class CommandOSIgnore final
: public Command
{
private:
- Anope::string RealMask(const Anope::string &mask)
+ static Anope::string RealMask(const Anope::string &mask)
{
/* If it s an existing user, we ignore the hostmask. */
User *u = User::Find(mask, true);
@@ -245,7 +245,7 @@ private:
}
}
- void DoList(CommandSource &source)
+ static void DoList(CommandSource &source)
{
if (!ignore_service)
return;
diff --git a/modules/operserv/os_oper.cpp b/modules/operserv/os_oper.cpp
index 73cd793da..d05650d7c 100644
--- a/modules/operserv/os_oper.cpp
+++ b/modules/operserv/os_oper.cpp
@@ -51,7 +51,7 @@ struct MyOper final
class CommandOSOper final
: public Command
{
- bool HasPrivs(CommandSource &source, OperType *ot) const
+ static bool HasPrivs(CommandSource &source, OperType *ot)
{
for (const auto &command : ot->GetCommands())
{
diff --git a/modules/operserv/os_session.cpp b/modules/operserv/os_session.cpp
index ffa2b3cc9..02695c55a 100644
--- a/modules/operserv/os_session.cpp
+++ b/modules/operserv/os_session.cpp
@@ -174,7 +174,7 @@ class CommandOSSession final
: public Command
{
private:
- void DoList(CommandSource &source, const std::vector<Anope::string> &params)
+ static void DoList(CommandSource &source, const std::vector<Anope::string> &params)
{
Anope::string param = params[1];
@@ -216,7 +216,7 @@ private:
return;
}
- void DoView(CommandSource &source, const std::vector<Anope::string> &params)
+ static void DoView(CommandSource &source, const std::vector<Anope::string> &params)
{
Anope::string param = params[1];
Session *session = session_service->FindSession(param);
diff --git a/modules/operserv/os_stats.cpp b/modules/operserv/os_stats.cpp
index fe4cd6f80..52c7cb7dc 100644
--- a/modules/operserv/os_stats.cpp
+++ b/modules/operserv/os_stats.cpp
@@ -129,14 +129,14 @@ private:
}
}
- void DoStatsReset(CommandSource &source)
+ static void DoStatsReset(CommandSource &source)
{
MaxUserCount = UserListByNick.size();
source.Reply(_("Statistics reset."));
return;
}
- void DoStatsUptime(CommandSource &source)
+ static void DoStatsUptime(CommandSource &source)
{
time_t uptime = Anope::CurTime - Anope::StartTime;
source.Reply(_("Current users: \002%zu\002 (\002%d\002 ops)"), UserListByNick.size(), OperCount);
@@ -146,7 +146,7 @@ private:
return;
}
- void DoStatsUplink(CommandSource &source)
+ static void DoStatsUplink(CommandSource &source)
{
Anope::string buf;
for (const auto &capab : Servers::Capab)
diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp
index 91b806671..9c88b94a3 100644
--- a/modules/protocol/bahamut.cpp
+++ b/modules/protocol/bahamut.cpp
@@ -514,7 +514,7 @@ class ProtoBahamut final
IRCDMessageSJoin message_sjoin;
IRCDMessageTopic message_topic;
- void AddModes()
+ static void AddModes()
{
/* Add user modes */
ModeManager::AddUserMode(new UserModeOperOnly("SERV_ADMIN", 'A'));
diff --git a/modules/protocol/hybrid.cpp b/modules/protocol/hybrid.cpp
index a0ee2a2eb..0f3f767d3 100644
--- a/modules/protocol/hybrid.cpp
+++ b/modules/protocol/hybrid.cpp
@@ -721,7 +721,7 @@ class ProtoHybrid final
bool use_server_side_mlock;
- void AddModes()
+ static void AddModes()
{
/* Add user modes */
ModeManager::AddUserMode(new UserModeOperOnly("ADMIN", 'a'));
diff --git a/modules/protocol/inspircd.cpp b/modules/protocol/inspircd.cpp
index 0d120c208..efefc4ab3 100644
--- a/modules/protocol/inspircd.cpp
+++ b/modules/protocol/inspircd.cpp
@@ -69,7 +69,7 @@ class InspIRCdProto final
: public IRCDProto
{
private:
- void SendChgIdentInternal(const Anope::string &nick, const Anope::string &vIdent)
+ static void SendChgIdentInternal(const Anope::string &nick, const Anope::string &vIdent)
{
if (!Servers::Capab.count("CHGIDENT"))
Log() << "CHGIDENT not loaded!";
@@ -77,7 +77,7 @@ private:
Uplink::Send("CHGIDENT", nick, vIdent);
}
- void SendChgHostInternal(const Anope::string &nick, const Anope::string &vhost)
+ static void SendChgHostInternal(const Anope::string &nick, const Anope::string &vhost)
{
if (!Servers::Capab.count("CHGHOST"))
Log() << "CHGHOST not loaded!";
@@ -85,17 +85,17 @@ private:
Uplink::Send("CHGHOST", nick, vhost);
}
- void SendAddLine(const Anope::string &xtype, const Anope::string &mask, time_t duration, const Anope::string &addedby, const Anope::string &reason)
+ static void SendAddLine(const Anope::string &xtype, const Anope::string &mask, time_t duration, const Anope::string &addedby, const Anope::string &reason)
{
Uplink::Send("ADDLINE", xtype, mask, addedby, Anope::CurTime, duration, reason);
}
- void SendDelLine(const Anope::string &xtype, const Anope::string &mask)
+ static void SendDelLine(const Anope::string &xtype, const Anope::string &mask)
{
Uplink::Send("DELLINE", xtype, mask);
}
- void SendAccount(const Anope::string &uid, NickAlias *na)
+ static void SendAccount(const Anope::string &uid, NickAlias *na)
{
Uplink::Send("METADATA", uid, "accountid", na ? na->nc->GetId() : Anope::string());
Uplink::Send("METADATA", uid, "accountname", na ? na->nc->display : Anope::string());
@@ -782,7 +782,7 @@ public:
return IsValid(value, false);
}
- bool IsValid(const Anope::string &value, bool historymode) const
+ static bool IsValid(const Anope::string &value, bool historymode)
{
if (value.empty())
return false; // empty param is never valid
@@ -2027,7 +2027,7 @@ class ProtoInspIRCd final
bool use_server_side_topiclock, use_server_side_mlock;
- void SendChannelMetadata(Channel *c, const Anope::string &metadataname, const Anope::string &value)
+ static void SendChannelMetadata(Channel *c, const Anope::string &metadataname, const Anope::string &value)
{
Uplink::Send("METADATA", c->name, c->creation_time, metadataname, value);
}
diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp
index 90c5bb252..c16ab44a8 100644
--- a/modules/protocol/ngircd.cpp
+++ b/modules/protocol/ngircd.cpp
@@ -624,7 +624,7 @@ class ProtongIRCd final
IRCDMessageServer message_server;
IRCDMessageTopic message_topic;
- void AddModes()
+ static void AddModes()
{
/* Add user modes */
ModeManager::AddUserMode(new UserMode("NOCTCP", 'b'));
diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp
index c3a245b49..1e5ae714b 100644
--- a/modules/protocol/plexus.cpp
+++ b/modules/protocol/plexus.cpp
@@ -368,7 +368,7 @@ class ProtoPlexus final
IRCDMessageServer message_server;
IRCDMessageUID message_uid;
- void AddModes()
+ static void AddModes()
{
/* Add user modes */
ModeManager::AddUserMode(new UserModeOperOnly("ADMIN", 'a'));
diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp
index 47cf69f94..18dd448af 100644
--- a/modules/protocol/ratbox.cpp
+++ b/modules/protocol/ratbox.cpp
@@ -18,7 +18,7 @@ static ServiceReference<IRCDProto> hybrid("IRCDProto", "hybrid");
class RatboxProto final
: public IRCDProto
{
- BotInfo *FindIntroduced()
+ static BotInfo *FindIntroduced()
{
BotInfo *bi = Config->GetClient("OperServ");
@@ -294,7 +294,7 @@ class ProtoRatbox final
IRCDMessageTBurst message_tburst;
IRCDMessageUID message_uid;
- void AddModes()
+ static void AddModes()
{
/* user modes */
ModeManager::AddUserMode(new UserModeOperOnly("ADMIN", 'a'));
diff --git a/modules/protocol/solanum.cpp b/modules/protocol/solanum.cpp
index 843ffa33d..59d401741 100644
--- a/modules/protocol/solanum.cpp
+++ b/modules/protocol/solanum.cpp
@@ -356,7 +356,7 @@ class ProtoSolanum final
bool use_server_side_mlock;
- void AddModes()
+ static void AddModes()
{
/* Add user modes */
ModeManager::AddUserMode(new UserMode("NOFORWARD", 'Q'));
diff --git a/modules/redis.cpp b/modules/redis.cpp
index 6aa62bb29..8b333a7ff 100644
--- a/modules/redis.cpp
+++ b/modules/redis.cpp
@@ -112,7 +112,7 @@ public:
}
private:
- inline void Pack(std::vector<char> &buffer, const char *buf, size_t sz = 0)
+ static inline void Pack(std::vector<char> &buffer, const char *buf, size_t sz = 0)
{
if (!sz)
sz = strlen(buf);
diff --git a/modules/xmlrpc_main.cpp b/modules/xmlrpc_main.cpp
index cdf29d47f..dedb587f9 100644
--- a/modules/xmlrpc_main.cpp
+++ b/modules/xmlrpc_main.cpp
@@ -121,7 +121,7 @@ private:
}
}
- bool DoCheckAuthentication(XMLRPCServiceInterface *iface, HTTPClient *client, XMLRPCRequest &request)
+ static bool DoCheckAuthentication(XMLRPCServiceInterface *iface, HTTPClient *client, XMLRPCRequest &request)
{
Anope::string username = request.data.size() > 0 ? request.data[0] : "";
Anope::string password = request.data.size() > 1 ? request.data[1] : "";
@@ -139,7 +139,7 @@ private:
return true;
}
- void DoStats(XMLRPCServiceInterface *iface, HTTPClient *client, XMLRPCRequest &request)
+ static void DoStats(XMLRPCServiceInterface *iface, HTTPClient *client, XMLRPCRequest &request)
{
request.reply("uptime", stringify(Anope::CurTime - Anope::StartTime));
request.reply("uplinkname", Me->GetLinks().front()->GetName());
@@ -156,7 +156,7 @@ private:
request.reply("channelcount", stringify(ChannelList.size()));
}
- void DoChannel(XMLRPCServiceInterface *iface, HTTPClient *client, XMLRPCRequest &request)
+ static void DoChannel(XMLRPCServiceInterface *iface, HTTPClient *client, XMLRPCRequest &request)
{
if (request.data.empty())
return;
@@ -205,7 +205,7 @@ private:
}
}
- void DoUser(XMLRPCServiceInterface *iface, HTTPClient *client, XMLRPCRequest &request)
+ static void DoUser(XMLRPCServiceInterface *iface, HTTPClient *client, XMLRPCRequest &request)
{
if (request.data.empty())
return;
@@ -247,7 +247,7 @@ private:
}
}
- void DoOperType(XMLRPCServiceInterface *iface, HTTPClient *client, XMLRPCRequest &request)
+ static void DoOperType(XMLRPCServiceInterface *iface, HTTPClient *client, XMLRPCRequest &request)
{
for (auto *ot : Config->MyOperTypes)
{
@@ -260,7 +260,7 @@ private:
}
}
- void DoNotice(XMLRPCServiceInterface *iface, HTTPClient *client, XMLRPCRequest &request)
+ static void DoNotice(XMLRPCServiceInterface *iface, HTTPClient *client, XMLRPCRequest &request)
{
Anope::string from = request.data.size() > 0 ? request.data[0] : "";
Anope::string to = request.data.size() > 1 ? request.data[1] : "";