diff options
| author | Adam <Adam@anope.org> | 2012-09-01 18:54:51 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2012-09-01 18:54:51 -0400 |
| commit | e3d5140dcc936ff411c438b7e3997104cb5f085a (patch) | |
| tree | 49d7ee0b3e531a1c81e35fb10f25e6340fa781ba /modules/extra/webcpanel/pages/logout.cpp | |
| parent | f81d0113a21187d68c5fa0f1262e5514465b1953 (diff) | |
Added a web panel module + a default template
Diffstat (limited to 'modules/extra/webcpanel/pages/logout.cpp')
| -rw-r--r-- | modules/extra/webcpanel/pages/logout.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/modules/extra/webcpanel/pages/logout.cpp b/modules/extra/webcpanel/pages/logout.cpp new file mode 100644 index 000000000..90a6a8a9b --- /dev/null +++ b/modules/extra/webcpanel/pages/logout.cpp @@ -0,0 +1,22 @@ +/* + * (C) 2003-2012 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + */ + +#include "../webcpanel.h" + +WebCPanel::Logout::Logout(const Anope::string &u) : WebPanelProtectedPage("", u) +{ +} + +void WebCPanel::Logout::OnRequest(HTTPProvider *server, const Anope::string &page_name, HTTPClient *client, HTTPMessage &message, HTTPReply &reply, NickAlias *na, TemplateFileServer::Replacements &replacements) +{ + na->Shrink("webcpanel_id"); + na->Shrink("webcpanel_ip"); + + reply.error = HTTP_FOUND; + reply.headers["Location"] = "http://" + message.headers["Host"]; +} + |
