diff --git a/frontend.pm b/frontend.pm index d3a2b14..363c6e7 100644 --- a/frontend.pm +++ b/frontend.pm @@ -297,6 +297,31 @@ sub sendBadRequest { $aClient->send($response); } +sub sendForbidden { + my $aClient = $_[0]; + my $aMessage = $_[1]; + + my $content = "

403 Forbidden

irclogger_web
Error: $aMessage"; + my $response = getBaseResponse(403, "Forbidden"); + $response.="Content-Type: text/html, charset=utf-8\r\n"; + $response.="Content-Length: ".length($content)."\r\n\r\n"; + $response.=$content; + $aClient->send($response); +} + +sub sendConflict { + my $aClient = $_[0]; + my $aMessage = $_[1]; + + my $content = "

409 Conflict

irclogger_web
Error: $aMessage"; + my $response = getBaseResponse(409, "Conflict"); + $response.="Content-Type: text/html, charset=utf-8\r\n"; + $response.="Content-Length: ".length($content)."\r\n\r\n"; + $response.=$content; + $aClient->send($response); + +} + sub redirect { my $aClient = $_[0]; my $aLocation = $_[1]; diff --git a/frontend_routes.pm b/frontend_routes.pm index 0ed4dd7..0656f22 100644 --- a/frontend_routes.pm +++ b/frontend_routes.pm @@ -18,6 +18,7 @@ package frontend_routes; use lib "."; use frontend_session; +use logger; use Digest::SHA; @@ -186,10 +187,10 @@ sub handlePath { my $manageServers = ""; if($privileges==2) { $manageServers.="

Manage servers

"; - $manageServers.="
"; + $manageServers.=""; $manageServers.="
"; $manageServers.=" "; - $manageServers.="
"; + $manageServers.="
"; $manageServers.=""; $manageServers.="
"; } @@ -197,7 +198,7 @@ sub handlePath { my $manageChannels = ""; if($privileges==2) { $manageChannels.="

Manage channels

"; - $manageChannels.="
"; + $manageChannels.=""; $manageChannels.=" at "; $manageChannels.="