diff options
| author | Sadie Powell <sadie@witchery.services> | 2024-01-23 15:28:23 +0000 |
|---|---|---|
| committer | Sadie Powell <sadie@witchery.services> | 2024-01-23 15:28:23 +0000 |
| commit | a6a0f6c44780c839b2269f4f29a26ecfdbd95544 (patch) | |
| tree | d4d1fded5c14350eb003a665ca8de500a0440cea /modules/webcpanel | |
| parent | 398d674cf40c0dba4e4cd2edd0f325ace15128c2 (diff) | |
Improve the layout of types that inherit from another type.
Diffstat (limited to 'modules/webcpanel')
23 files changed, 55 insertions, 27 deletions
diff --git a/modules/webcpanel/pages/chanserv/access.h b/modules/webcpanel/pages/chanserv/access.h index e386b3d31..bc2a99bd8 100644 --- a/modules/webcpanel/pages/chanserv/access.h +++ b/modules/webcpanel/pages/chanserv/access.h @@ -13,7 +13,8 @@ namespace WebCPanel namespace ChanServ { -class Access : public WebPanelProtectedPage +class Access + : public WebPanelProtectedPage { public: Access(const Anope::string &cat, const Anope::string &u); diff --git a/modules/webcpanel/pages/chanserv/akick.h b/modules/webcpanel/pages/chanserv/akick.h index 72549e0b7..fe09f8583 100644 --- a/modules/webcpanel/pages/chanserv/akick.h +++ b/modules/webcpanel/pages/chanserv/akick.h @@ -13,7 +13,8 @@ namespace WebCPanel namespace ChanServ { -class Akick : public WebPanelProtectedPage +class Akick + : public WebPanelProtectedPage { public: Akick(const Anope::string &cat, const Anope::string &u); diff --git a/modules/webcpanel/pages/chanserv/drop.h b/modules/webcpanel/pages/chanserv/drop.h index 849a5e236..7f9e7ecf8 100644 --- a/modules/webcpanel/pages/chanserv/drop.h +++ b/modules/webcpanel/pages/chanserv/drop.h @@ -13,7 +13,8 @@ namespace WebCPanel namespace ChanServ { - class Drop : public WebPanelProtectedPage + class Drop + : public WebPanelProtectedPage { public: Drop(const Anope::string &cat, const Anope::string &u); diff --git a/modules/webcpanel/pages/chanserv/info.h b/modules/webcpanel/pages/chanserv/info.h index 91c8d2422..e6e5579ef 100644 --- a/modules/webcpanel/pages/chanserv/info.h +++ b/modules/webcpanel/pages/chanserv/info.h @@ -13,7 +13,8 @@ namespace WebCPanel namespace ChanServ { -class Info : public WebPanelProtectedPage +class Info + : public WebPanelProtectedPage { public: Info(const Anope::string &cat, const Anope::string &u); diff --git a/modules/webcpanel/pages/chanserv/modes.h b/modules/webcpanel/pages/chanserv/modes.h index a6ddce67f..becb1b1d7 100644 --- a/modules/webcpanel/pages/chanserv/modes.h +++ b/modules/webcpanel/pages/chanserv/modes.h @@ -13,7 +13,8 @@ namespace WebCPanel namespace ChanServ { -class Modes : public WebPanelProtectedPage +class Modes + : public WebPanelProtectedPage { public: Modes(const Anope::string &cat, const Anope::string &u); diff --git a/modules/webcpanel/pages/chanserv/set.h b/modules/webcpanel/pages/chanserv/set.h index 48b11ccf2..0d0f08029 100644 --- a/modules/webcpanel/pages/chanserv/set.h +++ b/modules/webcpanel/pages/chanserv/set.h @@ -13,7 +13,8 @@ namespace WebCPanel namespace ChanServ { -class Set : public WebPanelProtectedPage +class Set + : public WebPanelProtectedPage { public: Set(const Anope::string &cat, const Anope::string &u); diff --git a/modules/webcpanel/pages/confirm.h b/modules/webcpanel/pages/confirm.h index bb755f9c7..875175571 100644 --- a/modules/webcpanel/pages/confirm.h +++ b/modules/webcpanel/pages/confirm.h @@ -12,7 +12,8 @@ namespace WebCPanel { -class Confirm : public WebPanelPage +class Confirm + : public WebPanelPage { public: Confirm(const Anope::string &u) : WebPanelPage(u) { } diff --git a/modules/webcpanel/pages/hostserv/request.h b/modules/webcpanel/pages/hostserv/request.h index 1df48e40c..dc800a2c8 100644 --- a/modules/webcpanel/pages/hostserv/request.h +++ b/modules/webcpanel/pages/hostserv/request.h @@ -13,7 +13,8 @@ namespace WebCPanel namespace HostServ { -class Request : public WebPanelProtectedPage +class Request + : public WebPanelProtectedPage { public: Request(const Anope::string &cat, const Anope::string &u); diff --git a/modules/webcpanel/pages/index.cpp b/modules/webcpanel/pages/index.cpp index bb83aba61..e7453d698 100644 --- a/modules/webcpanel/pages/index.cpp +++ b/modules/webcpanel/pages/index.cpp @@ -7,7 +7,8 @@ #include "../webcpanel.h" -class WebpanelRequest : public IdentifyRequest +class WebpanelRequest + : public IdentifyRequest { HTTPReply reply; HTTPMessage message; diff --git a/modules/webcpanel/pages/index.h b/modules/webcpanel/pages/index.h index d28fbf567..d25069f8e 100644 --- a/modules/webcpanel/pages/index.h +++ b/modules/webcpanel/pages/index.h @@ -12,7 +12,8 @@ namespace WebCPanel { -class Index : public WebPanelPage +class Index + : public WebPanelPage { static const int FLUSH_TIME = 60; diff --git a/modules/webcpanel/pages/logout.h b/modules/webcpanel/pages/logout.h index 8f170ea92..94fd60cb5 100644 --- a/modules/webcpanel/pages/logout.h +++ b/modules/webcpanel/pages/logout.h @@ -10,7 +10,8 @@ namespace WebCPanel { -class Logout : public WebPanelProtectedPage +class Logout + : public WebPanelProtectedPage { public: Logout(const Anope::string &u); diff --git a/modules/webcpanel/pages/memoserv/memos.h b/modules/webcpanel/pages/memoserv/memos.h index bb5ebfd6f..bb5cec5fe 100644 --- a/modules/webcpanel/pages/memoserv/memos.h +++ b/modules/webcpanel/pages/memoserv/memos.h @@ -13,7 +13,8 @@ namespace WebCPanel namespace MemoServ { -class Memos : public WebPanelProtectedPage +class Memos + : public WebPanelProtectedPage { public: Memos(const Anope::string &cat, const Anope::string &u); diff --git a/modules/webcpanel/pages/nickserv/access.h b/modules/webcpanel/pages/nickserv/access.h index 6dc9fe0d6..f0d421bf7 100644 --- a/modules/webcpanel/pages/nickserv/access.h +++ b/modules/webcpanel/pages/nickserv/access.h @@ -13,7 +13,8 @@ namespace WebCPanel namespace NickServ { -class Access : public WebPanelProtectedPage +class Access + : public WebPanelProtectedPage { public: Access(const Anope::string &cat, const Anope::string &u); diff --git a/modules/webcpanel/pages/nickserv/alist.h b/modules/webcpanel/pages/nickserv/alist.h index 2eddd7699..3dbccbc78 100644 --- a/modules/webcpanel/pages/nickserv/alist.h +++ b/modules/webcpanel/pages/nickserv/alist.h @@ -13,7 +13,8 @@ namespace WebCPanel namespace NickServ { -class Alist : public WebPanelProtectedPage +class Alist + : public WebPanelProtectedPage { public: Alist(const Anope::string &cat, const Anope::string &u); diff --git a/modules/webcpanel/pages/nickserv/cert.h b/modules/webcpanel/pages/nickserv/cert.h index 2ec3ac029..62f7f0e52 100644 --- a/modules/webcpanel/pages/nickserv/cert.h +++ b/modules/webcpanel/pages/nickserv/cert.h @@ -13,7 +13,8 @@ namespace WebCPanel namespace NickServ { -class Cert : public WebPanelProtectedPage +class Cert + : public WebPanelProtectedPage { public: Cert(const Anope::string &cat, const Anope::string &u); diff --git a/modules/webcpanel/pages/nickserv/confirm.h b/modules/webcpanel/pages/nickserv/confirm.h index 7b1e4a8b8..e71217b8c 100644 --- a/modules/webcpanel/pages/nickserv/confirm.h +++ b/modules/webcpanel/pages/nickserv/confirm.h @@ -11,7 +11,8 @@ namespace WebCPanel namespace NickServ { -class Confirm : public WebPanelProtectedPage +class Confirm + : public WebPanelProtectedPage { public: Confirm(const Anope::string &cat, const Anope::string &u); diff --git a/modules/webcpanel/pages/nickserv/info.h b/modules/webcpanel/pages/nickserv/info.h index dd3c2e440..a7b826990 100644 --- a/modules/webcpanel/pages/nickserv/info.h +++ b/modules/webcpanel/pages/nickserv/info.h @@ -13,7 +13,8 @@ namespace WebCPanel namespace NickServ { -class Info : public WebPanelProtectedPage +class Info + : public WebPanelProtectedPage { public: Info(const Anope::string &cat, const Anope::string &u); diff --git a/modules/webcpanel/pages/operserv/akill.h b/modules/webcpanel/pages/operserv/akill.h index 6eb69b68b..11d95d3fa 100644 --- a/modules/webcpanel/pages/operserv/akill.h +++ b/modules/webcpanel/pages/operserv/akill.h @@ -13,7 +13,8 @@ namespace WebCPanel namespace OperServ { -class Akill : public WebPanelProtectedPage +class Akill + : public WebPanelProtectedPage { public: Akill(const Anope::string &cat, const Anope::string &u); diff --git a/modules/webcpanel/pages/register.h b/modules/webcpanel/pages/register.h index 46e8ec782..e49ab05da 100644 --- a/modules/webcpanel/pages/register.h +++ b/modules/webcpanel/pages/register.h @@ -12,7 +12,8 @@ namespace WebCPanel { -class Register : public WebPanelPage +class Register + : public WebPanelPage { public: Register(const Anope::string &u) : WebPanelPage(u) { } diff --git a/modules/webcpanel/static_fileserver.h b/modules/webcpanel/static_fileserver.h index 6fc2da263..16e1fcd7b 100644 --- a/modules/webcpanel/static_fileserver.h +++ b/modules/webcpanel/static_fileserver.h @@ -10,7 +10,8 @@ #include "modules/httpd.h" /* A basic file server. Used for serving static content on disk. */ -class StaticFileServer : public HTTPPage +class StaticFileServer + : public HTTPPage { Anope::string file_name; public: diff --git a/modules/webcpanel/template_fileserver.h b/modules/webcpanel/template_fileserver.h index 5e224568e..8c5437e30 100644 --- a/modules/webcpanel/template_fileserver.h +++ b/modules/webcpanel/template_fileserver.h @@ -14,7 +14,8 @@ class TemplateFileServer { Anope::string file_name; public: - struct Replacements : std::multimap<Anope::string, Anope::string> + struct Replacements + : std::multimap<Anope::string, Anope::string> { Anope::string& operator[](const Anope::string &key) { diff --git a/modules/webcpanel/webcpanel.cpp b/modules/webcpanel/webcpanel.cpp index 7524dc2ca..910547a27 100644 --- a/modules/webcpanel/webcpanel.cpp +++ b/modules/webcpanel/webcpanel.cpp @@ -10,7 +10,8 @@ Module *me; Anope::string provider_name, template_name, template_base, page_title; -class ModuleWebCPanel : public Module +class ModuleWebCPanel + : public Module { ServiceReference<HTTPProvider> provider; Panel panel; @@ -260,7 +261,8 @@ namespace WebPanel bi = BotListByNick->begin()->second; // Pick one... } - struct MyComandReply : CommandReply + struct MyComandReply + : CommandReply { TemplateFileServer::Replacements &re; const Anope::string &k; @@ -300,7 +302,8 @@ namespace WebPanel if (!info) return; - struct MyComandReply : CommandReply + struct MyComandReply + : CommandReply { TemplateFileServer::Replacements &re; const Anope::string &k; diff --git a/modules/webcpanel/webcpanel.h b/modules/webcpanel/webcpanel.h index 8ec3ea8f9..2501971a8 100644 --- a/modules/webcpanel/webcpanel.h +++ b/modules/webcpanel/webcpanel.h @@ -30,7 +30,9 @@ struct Section }; /* An interface for this webpanel used by other modules */ -class Panel : public Section, public Service +class Panel + : public Section + , public Service { public: Panel(Module *c, const Anope::string &n) : Service(c, "Panel", n) { } @@ -63,7 +65,8 @@ public: } }; -class WebPanelPage : public HTTPPage +class WebPanelPage + : public HTTPPage { public: WebPanelPage(const Anope::string &u, const Anope::string &ct = "text/html") : HTTPPage(u, ct) @@ -73,7 +76,8 @@ public: virtual bool OnRequest(HTTPProvider *, const Anope::string &, HTTPClient *, HTTPMessage &, HTTPReply &) = 0; }; -class WebPanelProtectedPage : public WebPanelPage +class WebPanelProtectedPage + : public WebPanelPage { Anope::string category; |
