ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/modules/m_post.c
Revision: 3266
Committed: Sat Apr 5 19:15:11 2014 UTC (11 years, 4 months ago) by michael
Content type: text/x-csrc
File size: 2771 byte(s)
Log Message:
- Worked towards improving documentation

File Contents

# User Rev Content
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 3266 /*! \brief GET/POST/PUT command handler
36     *
37     * \param source_p Pointer to allocated Client struct from which the message
38     * originally comes from. This can be a local or remote client.
39     * \param parc Integer holding the number of supplied arguments.
40     * \param parv Argument vector where parv[0] .. parv[parc-1] are non-NULL
41     * pointers.
42     * \note Valid arguments for this command are:
43     * - parv[0] = command
44     */
45 michael 2820 static int
46 michael 3156 mr_dumb_proxy(struct Client *source_p, int parc, char *parv[])
47 michael 1230 {
48 michael 1618 sendto_realops_flags(UMODE_REJ, L_ALL, SEND_NOTICE,
49 michael 1230 "HTTP Proxy disconnected: [%s@%s]",
50 michael 3156 source_p->username, source_p->host);
51 michael 3171 exit_client(source_p, "Client Exit");
52 michael 2820 return 0;
53 michael 1230 }
54    
55 michael 2820 static struct Message post_msgtab =
56     {
57 michael 1569 "POST", 0, 0, 0, MAXPARA, MFLG_SLOW, 0,
58 michael 2820 { mr_dumb_proxy, m_ignore, m_ignore, m_ignore, m_ignore, m_ignore }
59 adx 30 };
60    
61 michael 2820 static struct Message get_msgtab =
62     {
63 michael 1569 "GET", 0, 0, 0, MAXPARA, MFLG_SLOW, 0,
64 michael 2820 { mr_dumb_proxy, m_ignore, m_ignore, m_ignore, m_ignore, m_ignore }
65 adx 30 };
66    
67 michael 2820 static struct Message put_msgtab =
68     {
69 michael 1569 "PUT", 0, 0, 0, MAXPARA, MFLG_SLOW, 0,
70 michael 2820 { mr_dumb_proxy, m_ignore, m_ignore, m_ignore, m_ignore, m_ignore }
71 adx 30 };
72    
73 michael 1230 static void
74     module_init(void)
75 adx 30 {
76     mod_add_cmd(&post_msgtab);
77     mod_add_cmd(&get_msgtab);
78     mod_add_cmd(&put_msgtab);
79     }
80    
81 michael 1230 static void
82     module_exit(void)
83 adx 30 {
84     mod_del_cmd(&post_msgtab);
85     mod_del_cmd(&get_msgtab);
86     mod_del_cmd(&put_msgtab);
87     }
88    
89 michael 2820 struct module module_entry =
90     {
91 michael 1230 .node = { NULL, NULL, NULL },
92     .name = NULL,
93     .version = "$Revision$",
94     .handle = NULL,
95     .modinit = module_init,
96     .modexit = module_exit,
97     .flags = 0
98     };

Properties

Name Value
svn:eol-style native
svn:keywords Id Revision