1 |
adx |
30 |
/* |
2 |
michael |
2820 |
* ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) |
3 |
adx |
30 |
* |
4 |
michael |
2820 |
* Copyright (c) 2001-2014 ircd-hybrid development team |
5 |
adx |
30 |
* |
6 |
|
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
|
* it under the terms of the GNU General Public License as published by |
8 |
|
|
* the Free Software Foundation; either version 2 of the License, or |
9 |
|
|
* (at your option) any later version. |
10 |
|
|
* |
11 |
|
|
* This program is distributed in the hope that it will be useful, |
12 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 |
|
|
* GNU General Public License for more details. |
15 |
|
|
* |
16 |
|
|
* You should have received a copy of the GNU General Public License |
17 |
|
|
* along with this program; if not, write to the Free Software |
18 |
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
19 |
|
|
* USA |
20 |
|
|
*/ |
21 |
|
|
|
22 |
michael |
2820 |
/*! \file m_post.c |
23 |
|
|
* \brief Includes required functions for processing the POST/GET/PUT command. |
24 |
|
|
* \version $Id$ |
25 |
|
|
*/ |
26 |
|
|
|
27 |
adx |
30 |
#include "stdinc.h" |
28 |
|
|
#include "client.h" |
29 |
|
|
#include "ircd.h" |
30 |
|
|
#include "send.h" |
31 |
|
|
#include "parse.h" |
32 |
|
|
#include "modules.h" |
33 |
|
|
|
34 |
|
|
|
35 |
michael |
1230 |
/* |
36 |
|
|
** mr_dumb_proxy |
37 |
|
|
** parv[0] = sender prefix |
38 |
|
|
** parv[1] = comment |
39 |
|
|
*/ |
40 |
michael |
2820 |
static int |
41 |
michael |
1230 |
mr_dumb_proxy(struct Client *client_p, struct Client *source_p, |
42 |
|
|
int parc, char *parv[]) |
43 |
|
|
{ |
44 |
michael |
1618 |
sendto_realops_flags(UMODE_REJ, L_ALL, SEND_NOTICE, |
45 |
michael |
1230 |
"HTTP Proxy disconnected: [%s@%s]", |
46 |
|
|
client_p->username, client_p->host); |
47 |
|
|
exit_client(source_p, source_p, "Client Exit"); |
48 |
michael |
2820 |
return 0; |
49 |
michael |
1230 |
} |
50 |
|
|
|
51 |
michael |
2820 |
static struct Message post_msgtab = |
52 |
|
|
{ |
53 |
michael |
1569 |
"POST", 0, 0, 0, MAXPARA, MFLG_SLOW, 0, |
54 |
michael |
2820 |
{ mr_dumb_proxy, m_ignore, m_ignore, m_ignore, m_ignore, m_ignore } |
55 |
adx |
30 |
}; |
56 |
|
|
|
57 |
michael |
2820 |
static struct Message get_msgtab = |
58 |
|
|
{ |
59 |
michael |
1569 |
"GET", 0, 0, 0, MAXPARA, MFLG_SLOW, 0, |
60 |
michael |
2820 |
{ mr_dumb_proxy, m_ignore, m_ignore, m_ignore, m_ignore, m_ignore } |
61 |
adx |
30 |
}; |
62 |
|
|
|
63 |
michael |
2820 |
static struct Message put_msgtab = |
64 |
|
|
{ |
65 |
michael |
1569 |
"PUT", 0, 0, 0, MAXPARA, MFLG_SLOW, 0, |
66 |
michael |
2820 |
{ mr_dumb_proxy, m_ignore, m_ignore, m_ignore, m_ignore, m_ignore } |
67 |
adx |
30 |
}; |
68 |
|
|
|
69 |
michael |
1230 |
static void |
70 |
|
|
module_init(void) |
71 |
adx |
30 |
{ |
72 |
|
|
mod_add_cmd(&post_msgtab); |
73 |
|
|
mod_add_cmd(&get_msgtab); |
74 |
|
|
mod_add_cmd(&put_msgtab); |
75 |
|
|
} |
76 |
|
|
|
77 |
michael |
1230 |
static void |
78 |
|
|
module_exit(void) |
79 |
adx |
30 |
{ |
80 |
|
|
mod_del_cmd(&post_msgtab); |
81 |
|
|
mod_del_cmd(&get_msgtab); |
82 |
|
|
mod_del_cmd(&put_msgtab); |
83 |
|
|
} |
84 |
|
|
|
85 |
michael |
2820 |
struct module module_entry = |
86 |
|
|
{ |
87 |
michael |
1230 |
.node = { NULL, NULL, NULL }, |
88 |
|
|
.name = NULL, |
89 |
|
|
.version = "$Revision$", |
90 |
|
|
.handle = NULL, |
91 |
|
|
.modinit = module_init, |
92 |
|
|
.modexit = module_exit, |
93 |
|
|
.flags = 0 |
94 |
|
|
}; |