X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Firc-login.c;h=92d54ab15e42ad64d2e7d05bd605bccc1cd7f734;hp=3c4eb189d58b7035d2c7bd7df7c53d47bceddced;hb=fa8b83e69b0d7edcfdcf8f0a4496c79f9c5ec161;hpb=33e8c2480649193799d88d003b9257873aaf2b31 diff --git a/src/ngircd/irc-login.c b/src/ngircd/irc-login.c index 3c4eb189..92d54ab1 100644 --- a/src/ngircd/irc-login.c +++ b/src/ngircd/irc-login.c @@ -683,10 +683,13 @@ IRC_QUIT( CLIENT *Client, REQUEST *Req ) } /* IRC_QUIT */ +#ifndef STRICT_RFC + /** - * Handler for the IRC "PING" command. + * Handler for HTTP command, e.g. GET and POST * - * See RFC 2812, 3.7.2 "Ping message". + * We handle these commands here to avoid the quite long timeout when + * some user tries to access this IRC daemon using an web browser ... * * @param Client The client from which this command has been received. * @param Req Request structure with prefix and all parameters. @@ -695,11 +698,23 @@ IRC_QUIT( CLIENT *Client, REQUEST *Req ) GLOBAL bool IRC_QUIT_HTTP( CLIENT *Client, REQUEST *Req ) { - Req->argc = 0; + Req->argc = 1; + Req->argv[0] = "Oops, HTTP request received? This is IRC!"; return IRC_QUIT(Client, Req); -} +} /* IRC_QUIT_HTTP */ + +#endif +/** + * Handler for the IRC "PING" command. + * + * See RFC 2812, 3.7.2 "Ping message". + * + * @param Client The client from which this command has been received. + * @param Req Request structure with prefix and all parameters. + * @returns CONNECTED or DISCONNECTED. + */ GLOBAL bool IRC_PING(CLIENT *Client, REQUEST *Req) {