about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGabor Adam Toth <tg@tgbit.net>2010-12-20 02:01:25 +0100
committerAlexander Barton <alex@barton.de>2011-03-16 22:59:57 +0100
commit33e8c2480649193799d88d003b9257873aaf2b31 (patch)
treecb20dddca613d62987294ad936b503979a5f8da8
parent5417a72536954927371d597e9a4e0453e70620e3 (diff)
downloadngircd-33e8c2480649193799d88d003b9257873aaf2b31.tar.gz
ngircd-33e8c2480649193799d88d003b9257873aaf2b31.zip
quit on HTTP commands: GET & POST
-rw-r--r--src/ngircd/irc-login.c8
-rw-r--r--src/ngircd/irc-login.h1
-rw-r--r--src/ngircd/parse.c2
3 files changed, 11 insertions, 0 deletions
diff --git a/src/ngircd/irc-login.c b/src/ngircd/irc-login.c
index f76a6270..3c4eb189 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 7ba53571..f3138f6e 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 7c56a03d..51149da5 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 },