Module: ngircd.git Branch: master Commit: 33e8c2480649193799d88d003b9257873aaf2b31 URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=33e8c...
Author: Gabor Adam Toth tg@tgbit.net Date: Mon Dec 20 02:01:25 2010 +0100
quit on HTTP commands: GET & POST
---
src/ngircd/irc-login.c | 8 ++++++++ src/ngircd/irc-login.h | 1 + src/ngircd/parse.c | 2 ++ 3 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/ngircd/irc-login.c b/src/ngircd/irc-login.c index f76a627..3c4eb18 100644 --- a/src/ngircd/irc-login.c +++ b/src/ngircd/irc-login.c @@ -693,6 +693,14 @@ IRC_QUIT( CLIENT *Client, REQUEST *Req ) * @returns CONNECTED or DISCONNECTED. */ GLOBAL bool +IRC_QUIT_HTTP( CLIENT *Client, REQUEST *Req ) +{ + Req->argc = 0; + return IRC_QUIT(Client, Req); +} + + +GLOBAL bool IRC_PING(CLIENT *Client, REQUEST *Req) { CLIENT *target, *from; diff --git a/src/ngircd/irc-login.h b/src/ngircd/irc-login.h index 7ba5357..f3138f6 100644 --- a/src/ngircd/irc-login.h +++ b/src/ngircd/irc-login.h @@ -25,6 +25,7 @@ GLOBAL bool IRC_WEBIRC PARAMS((CLIENT *Client, REQUEST *Req)); GLOBAL bool IRC_PING PARAMS((CLIENT *Client, REQUEST *Req)); GLOBAL bool IRC_PONG PARAMS((CLIENT *Client, REQUEST *Req)); GLOBAL bool IRC_QUIT PARAMS((CLIENT *Client, REQUEST *Req)); +GLOBAL bool IRC_QUIT_HTTP PARAMS((CLIENT *Client, REQUEST *Req));
#endif
diff --git a/src/ngircd/parse.c b/src/ngircd/parse.c index 7c56a03..51149da 100644 --- a/src/ngircd/parse.c +++ b/src/ngircd/parse.c @@ -85,6 +85,8 @@ static COMMAND My_Commands[] = { "PONG", IRC_PONG, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 }, { "PRIVMSG", IRC_PRIVMSG, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 }, { "QUIT", IRC_QUIT, 0xFFFF, 0, 0, 0 }, + { "GET", IRC_QUIT_HTTP, 0xFFFF, 0, 0, 0 }, + { "POST", IRC_QUIT_HTTP, 0xFFFF, 0, 0, 0 }, { "REHASH", IRC_REHASH, CLIENT_USER, 0, 0, 0 }, { "RESTART", IRC_RESTART, CLIENT_USER, 0, 0, 0 }, { "SERVER", IRC_SERVER, 0xFFFF, 0, 0, 0 },