summaryrefslogtreecommitdiff
path: root/modules/commands
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-01-23 15:28:23 +0000
committerSadie Powell <sadie@witchery.services>2024-01-23 15:28:23 +0000
commita6a0f6c44780c839b2269f4f29a26ecfdbd95544 (patch)
treed4d1fded5c14350eb003a665ca8de500a0440cea /modules/commands
parent398d674cf40c0dba4e4cd2edd0f325ace15128c2 (diff)
Improve the layout of types that inherit from another type.
Diffstat (limited to 'modules/commands')
-rw-r--r--modules/commands/bs_assign.cpp12
-rw-r--r--modules/commands/bs_badwords.cpp19
-rw-r--r--modules/commands/bs_bot.cpp6
-rw-r--r--modules/commands/bs_botlist.cpp6
-rw-r--r--modules/commands/bs_control.cpp9
-rw-r--r--modules/commands/bs_info.cpp6
-rw-r--r--modules/commands/bs_kick.cpp54
-rw-r--r--modules/commands/bs_set.cpp15
-rw-r--r--modules/commands/cs_access.cpp21
-rw-r--r--modules/commands/cs_akick.cpp12
-rw-r--r--modules/commands/cs_ban.cpp9
-rw-r--r--modules/commands/cs_clone.cpp6
-rw-r--r--modules/commands/cs_drop.cpp6
-rw-r--r--modules/commands/cs_enforce.cpp6
-rw-r--r--modules/commands/cs_entrymsg.cpp13
-rw-r--r--modules/commands/cs_flags.cpp12
-rw-r--r--modules/commands/cs_getkey.cpp6
-rw-r--r--modules/commands/cs_info.cpp6
-rw-r--r--modules/commands/cs_invite.cpp6
-rw-r--r--modules/commands/cs_kick.cpp6
-rw-r--r--modules/commands/cs_list.cpp9
-rw-r--r--modules/commands/cs_log.cpp13
-rw-r--r--modules/commands/cs_mode.cpp16
-rw-r--r--modules/commands/cs_register.cpp6
-rw-r--r--modules/commands/cs_seen.cpp12
-rw-r--r--modules/commands/cs_set.cpp51
-rw-r--r--modules/commands/cs_set_misc.cpp10
-rw-r--r--modules/commands/cs_status.cpp6
-rw-r--r--modules/commands/cs_suspend.cpp13
-rw-r--r--modules/commands/cs_sync.cpp6
-rw-r--r--modules/commands/cs_topic.cpp9
-rw-r--r--modules/commands/cs_unban.cpp6
-rw-r--r--modules/commands/cs_updown.cpp9
-rw-r--r--modules/commands/cs_xop.cpp18
-rw-r--r--modules/commands/gl_global.cpp6
-rw-r--r--modules/commands/greet.cpp12
-rw-r--r--modules/commands/help.cpp6
-rw-r--r--modules/commands/hs_del.cpp9
-rw-r--r--modules/commands/hs_group.cpp6
-rw-r--r--modules/commands/hs_list.cpp6
-rw-r--r--modules/commands/hs_off.cpp6
-rw-r--r--modules/commands/hs_on.cpp6
-rw-r--r--modules/commands/hs_request.cpp18
-rw-r--r--modules/commands/hs_set.cpp9
-rw-r--r--modules/commands/ms_cancel.cpp6
-rw-r--r--modules/commands/ms_check.cpp6
-rw-r--r--modules/commands/ms_del.cpp9
-rw-r--r--modules/commands/ms_ignore.cpp6
-rw-r--r--modules/commands/ms_info.cpp6
-rw-r--r--modules/commands/ms_list.cpp9
-rw-r--r--modules/commands/ms_read.cpp9
-rw-r--r--modules/commands/ms_rsend.cpp6
-rw-r--r--modules/commands/ms_send.cpp6
-rw-r--r--modules/commands/ms_sendall.cpp6
-rw-r--r--modules/commands/ms_set.cpp6
-rw-r--r--modules/commands/ms_staff.cpp6
-rw-r--r--modules/commands/ns_access.cpp6
-rw-r--r--modules/commands/ns_ajoin.cpp12
-rw-r--r--modules/commands/ns_alist.cpp6
-rw-r--r--modules/commands/ns_cert.cpp15
-rw-r--r--modules/commands/ns_drop.cpp6
-rw-r--r--modules/commands/ns_getemail.cpp6
-rw-r--r--modules/commands/ns_group.cpp15
-rw-r--r--modules/commands/ns_identify.cpp9
-rw-r--r--modules/commands/ns_info.cpp12
-rw-r--r--modules/commands/ns_list.cpp12
-rw-r--r--modules/commands/ns_logout.cpp6
-rw-r--r--modules/commands/ns_recover.cpp9
-rw-r--r--modules/commands/ns_register.cpp12
-rw-r--r--modules/commands/ns_resetpass.cpp6
-rw-r--r--modules/commands/ns_set.cpp75
-rw-r--r--modules/commands/ns_set_misc.cpp13
-rw-r--r--modules/commands/ns_status.cpp6
-rw-r--r--modules/commands/ns_suspend.cpp13
-rw-r--r--modules/commands/ns_update.cpp6
-rw-r--r--modules/commands/os_akill.cpp12
-rw-r--r--modules/commands/os_chankill.cpp6
-rw-r--r--modules/commands/os_config.cpp6
-rw-r--r--modules/commands/os_defcon.cpp9
-rw-r--r--modules/commands/os_dns.cpp12
-rw-r--r--modules/commands/os_forbid.cpp13
-rw-r--r--modules/commands/os_ignore.cpp13
-rw-r--r--modules/commands/os_info.cpp12
-rw-r--r--modules/commands/os_jupe.cpp6
-rw-r--r--modules/commands/os_kick.cpp6
-rw-r--r--modules/commands/os_kill.cpp6
-rw-r--r--modules/commands/os_list.cpp9
-rw-r--r--modules/commands/os_login.cpp9
-rw-r--r--modules/commands/os_logsearch.cpp6
-rw-r--r--modules/commands/os_mode.cpp9
-rw-r--r--modules/commands/os_modinfo.cpp9
-rw-r--r--modules/commands/os_module.cpp12
-rw-r--r--modules/commands/os_news.cpp21
-rw-r--r--modules/commands/os_noop.cpp6
-rw-r--r--modules/commands/os_oper.cpp10
-rw-r--r--modules/commands/os_reload.cpp6
-rw-r--r--modules/commands/os_session.cpp18
-rw-r--r--modules/commands/os_set.cpp6
-rw-r--r--modules/commands/os_shutdown.cpp12
-rw-r--r--modules/commands/os_stats.cpp9
-rw-r--r--modules/commands/os_svs.cpp12
-rw-r--r--modules/commands/os_sxline.cpp18
-rw-r--r--modules/commands/os_update.cpp6
103 files changed, 743 insertions, 366 deletions
diff --git a/modules/commands/bs_assign.cpp b/modules/commands/bs_assign.cpp
index ccce7571a..e1e744842 100644
--- a/modules/commands/bs_assign.cpp
+++ b/modules/commands/bs_assign.cpp
@@ -11,7 +11,8 @@
#include "module.h"
-class CommandBSAssign : public Command
+class CommandBSAssign
+ : public Command
{
public:
CommandBSAssign(Module *creator) : Command(creator, "botserv/assign", 2, 2)
@@ -82,7 +83,8 @@ public:
}
};
-class CommandBSUnassign : public Command
+class CommandBSUnassign
+ : public Command
{
public:
CommandBSUnassign(Module *creator) : Command(creator, "botserv/unassign", 1, 1)
@@ -145,7 +147,8 @@ public:
}
};
-class CommandBSSetNoBot : public Command
+class CommandBSSetNoBot
+ : public Command
{
public:
CommandBSSetNoBot(Module *creator, const Anope::string &sname = "botserv/set/nobot") : Command(creator, sname, 2, 2)
@@ -202,7 +205,8 @@ public:
}
};
-class BSAssign : public Module
+class BSAssign
+ : public Module
{
ExtensibleItem<bool> nobot;
diff --git a/modules/commands/bs_badwords.cpp b/modules/commands/bs_badwords.cpp
index 82e4e20b3..cf863e442 100644
--- a/modules/commands/bs_badwords.cpp
+++ b/modules/commands/bs_badwords.cpp
@@ -12,7 +12,9 @@
#include "module.h"
#include "modules/bs_badwords.h"
-struct BadWordImpl : BadWord, Serializable
+struct BadWordImpl
+ : BadWord
+ , Serializable
{
BadWordImpl() : Serializable("BadWord") { }
~BadWordImpl() override;
@@ -27,7 +29,8 @@ struct BadWordImpl : BadWord, Serializable
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
};
-struct BadWordsImpl : BadWords
+struct BadWordsImpl
+ : BadWords
{
Serialize::Reference<ChannelInfo> ci;
typedef std::vector<BadWordImpl *> list;
@@ -144,7 +147,8 @@ Serializable* BadWordImpl::Unserialize(Serializable *obj, Serialize::Data &data)
return bw;
}
-class BadwordsDelCallback : public NumberList
+class BadwordsDelCallback
+ : public NumberList
{
CommandSource &source;
ChannelInfo *ci;
@@ -181,7 +185,8 @@ public:
}
};
-class CommandBSBadwords : public Command
+class CommandBSBadwords
+ : public Command
{
private:
void DoList(CommandSource &source, ChannelInfo *ci, const Anope::string &word)
@@ -200,7 +205,8 @@ private:
}
else if (!word.empty() && word.find_first_not_of("1234567890,-") == Anope::string::npos)
{
- class BadwordsListCallback : public NumberList
+ class BadwordsListCallback
+ : public NumberList
{
ListFormatter &list;
BadWords *bw;
@@ -453,7 +459,8 @@ public:
}
};
-class BSBadwords : public Module
+class BSBadwords
+ : public Module
{
CommandBSBadwords commandbsbadwords;
ExtensibleItem<BadWordsImpl> badwords;
diff --git a/modules/commands/bs_bot.cpp b/modules/commands/bs_bot.cpp
index 6499e3baa..e882d3e04 100644
--- a/modules/commands/bs_bot.cpp
+++ b/modules/commands/bs_bot.cpp
@@ -11,7 +11,8 @@
#include "module.h"
-class CommandBSBot : public Command
+class CommandBSBot
+ : public Command
{
private:
void DoAdd(CommandSource &source, const std::vector<Anope::string> &params)
@@ -370,7 +371,8 @@ public:
}
};
-class BSBot : public Module
+class BSBot
+ : public Module
{
CommandBSBot commandbsbot;
diff --git a/modules/commands/bs_botlist.cpp b/modules/commands/bs_botlist.cpp
index a62cfe174..828b5af99 100644
--- a/modules/commands/bs_botlist.cpp
+++ b/modules/commands/bs_botlist.cpp
@@ -11,7 +11,8 @@
#include "module.h"
-class CommandBSBotList : public Command
+class CommandBSBotList
+ : public Command
{
public:
CommandBSBotList(Module *creator) : Command(creator, "botserv/botlist", 0, 0)
@@ -65,7 +66,8 @@ public:
}
};
-class BSBotList : public Module
+class BSBotList
+ : public Module
{
CommandBSBotList commandbsbotlist;
diff --git a/modules/commands/bs_control.cpp b/modules/commands/bs_control.cpp
index 1c7f0ddb4..1230f03e1 100644
--- a/modules/commands/bs_control.cpp
+++ b/modules/commands/bs_control.cpp
@@ -11,7 +11,8 @@
#include "module.h"
-class CommandBSSay : public Command
+class CommandBSSay
+ : public Command
{
public:
CommandBSSay(Module *creator) : Command(creator, "botserv/say", 2, 2)
@@ -71,7 +72,8 @@ public:
}
};
-class CommandBSAct : public Command
+class CommandBSAct
+ : public Command
{
public:
CommandBSAct(Module *creator) : Command(creator, "botserv/act", 2, 2)
@@ -130,7 +132,8 @@ public:
}
};
-class BSControl : public Module
+class BSControl
+ : public Module
{
CommandBSSay commandbssay;
CommandBSAct commandbsact;
diff --git a/modules/commands/bs_info.cpp b/modules/commands/bs_info.cpp
index 4c2b1d4e9..f8381836d 100644
--- a/modules/commands/bs_info.cpp
+++ b/modules/commands/bs_info.cpp
@@ -11,7 +11,8 @@
#include "module.h"
-class CommandBSInfo : public Command
+class CommandBSInfo
+ : public Command
{
private:
void send_bot_channels(std::vector<Anope::string> &buffers, const BotInfo *bi)
@@ -117,7 +118,8 @@ public:
}
};
-class BSInfo : public Module
+class BSInfo
+ : public Module
{
CommandBSInfo commandbsinfo;
diff --git a/modules/commands/bs_kick.cpp b/modules/commands/bs_kick.cpp
index e1919e241..e02c6cab8 100644
--- a/modules/commands/bs_kick.cpp
+++ b/modules/commands/bs_kick.cpp
@@ -15,7 +15,8 @@
static Module *me;
-struct KickerDataImpl : KickerData
+struct KickerDataImpl
+ : KickerData
{
KickerDataImpl(Extensible *obj)
{
@@ -37,7 +38,8 @@ struct KickerDataImpl : KickerData
ci->Shrink<KickerData>("kickerdata");
}
- struct ExtensibleItem : ::ExtensibleItem<KickerDataImpl>
+ struct ExtensibleItem
+ : ::ExtensibleItem<KickerDataImpl>
{
ExtensibleItem(Module *m, const Anope::string &ename) : ::ExtensibleItem<KickerDataImpl>(m, ename) { }
@@ -115,7 +117,8 @@ struct KickerDataImpl : KickerData
};
};
-class CommandBSKick : public Command
+class CommandBSKick
+ : public Command
{
public:
CommandBSKick(Module *creator) : Command(creator, "botserv/kick", 0)
@@ -159,7 +162,8 @@ public:
}
};
-class CommandBSKickBase : public Command
+class CommandBSKickBase
+ : public Command
{
public:
CommandBSKickBase(Module *creator, const Anope::string &cname, int minarg, int maxarg) : Command(creator, cname, minarg, maxarg)
@@ -244,7 +248,8 @@ protected:
}
};
-class CommandBSKickAMSG : public CommandBSKickBase
+class CommandBSKickAMSG
+ : public CommandBSKickBase
{
public:
CommandBSKickAMSG(Module *creator) : CommandBSKickBase(creator, "botserv/kick/amsg", 2, 3)
@@ -280,7 +285,8 @@ public:
}
};
-class CommandBSKickBadwords : public CommandBSKickBase
+class CommandBSKickBadwords
+ : public CommandBSKickBase
{
public:
CommandBSKickBadwords(Module *creator) : CommandBSKickBase(creator, "botserv/kick/badwords", 2, 3)
@@ -319,7 +325,8 @@ public:
}
};
-class CommandBSKickBolds : public CommandBSKickBase
+class CommandBSKickBolds
+ : public CommandBSKickBase
{
public:
CommandBSKickBolds(Module *creator) : CommandBSKickBase(creator, "botserv/kick/bolds", 2, 3)
@@ -353,7 +360,8 @@ public:
}
};