From 26ac315192e0d8a04d50e910697ab794eedf0cc1 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 20 Apr 2014 14:35:14 -0400 Subject: New event system --- modules/webcpanel/pages/index.cpp | 2 +- modules/webcpanel/webcpanel.cpp | 33 +++++++++++++++++++++++++-------- 2 files changed, 26 insertions(+), 9 deletions(-) (limited to 'modules/webcpanel') diff --git a/modules/webcpanel/pages/index.cpp b/modules/webcpanel/pages/index.cpp index debedd551..0b2ce3d9c 100644 --- a/modules/webcpanel/pages/index.cpp +++ b/modules/webcpanel/pages/index.cpp @@ -87,7 +87,7 @@ bool WebCPanel::Index::OnRequest(HTTPProvider *server, const Anope::string &page // Rate limit check. WebpanelRequest *req = new WebpanelRequest(me, reply, message, server, page_name, client, replacements, user, pass); - FOREACH_MOD(OnCheckAuthentication, (NULL, req)); + Event::OnCheckAuthentication(&Event::CheckAuthentication::OnCheckAuthentication, nullptr, req); req->Dispatch(); return false; } diff --git a/modules/webcpanel/webcpanel.cpp b/modules/webcpanel/webcpanel.cpp index d5acfbf67..17a64529b 100644 --- a/modules/webcpanel/webcpanel.cpp +++ b/modules/webcpanel/webcpanel.cpp @@ -43,14 +43,31 @@ class ModuleWebCPanel : public Module public: - ModuleWebCPanel(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR), - panel(this, "webcpanel"), id(this, "webcpanel_id"), ip(this, "webcpanel_ip"), - style_css("style.css", "/static/style.css", "text/css"), logo_png("logo.png", "/static/logo.png", "image/png"), cubes_png("cubes.png", "/static/cubes.png", "image/png"), favicon_ico("favicon.ico", "/favicon.ico", "image/x-icon"), - index("/"), logout("/logout"), _register("/register"), confirm("/confirm"), - nickserv_info("NickServ", "/nickserv/info"), nickserv_cert("NickServ", "/nickserv/cert"), nickserv_access("NickServ", "/nickserv/access"), nickserv_alist("NickServ", "/nickserv/alist"), - chanserv_info("ChanServ", "/chanserv/info"), chanserv_set("ChanServ", "/chanserv/set"), chanserv_access("ChanServ", "/chanserv/access"), chanserv_akick("ChanServ", "/chanserv/akick"), - chanserv_modes("ChanServ", "/chanserv/modes"), chanserv_drop("ChanServ", "/chanserv/drop"), memoserv_memos("MemoServ", "/memoserv/memos"), hostserv_request("HostServ", "/hostserv/request"), - operserv_akill("OperServ", "/operserv/akill") + ModuleWebCPanel(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR) + , panel(this, "webcpanel") + , id(this, "webcpanel_id") + , ip(this, "webcpanel_ip") + , style_css("style.css", "/static/style.css", "text/css") + , logo_png("logo.png", "/static/logo.png", "image/png") + , cubes_png("cubes.png", "/static/cubes.png", "image/png") + , favicon_ico("favicon.ico", "/favicon.ico", "image/x-icon") + , index("/") + , logout("/logout") + , _register("/register") + , confirm("/confirm") + , nickserv_info("NickServ", "/nickserv/info") + , nickserv_cert("NickServ", "/nickserv/cert") + , nickserv_access("NickServ", "/nickserv/access") + , nickserv_alist("NickServ", "/nickserv/alist") + , chanserv_info("ChanServ", "/chanserv/info") + , chanserv_set("ChanServ", "/chanserv/set") + , chanserv_access("ChanServ", "/chanserv/access") + , chanserv_akick("ChanServ", "/chanserv/akick") + , chanserv_modes("ChanServ", "/chanserv/modes") + , chanserv_drop("ChanServ", "/chanserv/drop") + , memoserv_memos("MemoServ", "/memoserv/memos") + , hostserv_request("HostServ", "/hostserv/request") + , operserv_akill("OperServ", "/operserv/akill") { me = this; -- cgit