ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/modules/m_post.c
Revision: 3096
Committed: Sat Mar 1 23:31:45 2014 UTC (12 years, 4 months ago) by michael
Content type: text/x-csrc
File size: 2439 byte(s)
Log Message:
- Applied Adam's "Put the command name in parv[0], not prefix name" patch

File Contents

# Content
1 /*
2 * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3 *
4 * Copyright (c) 2001-2014 ircd-hybrid development team
5 *
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 /*! \file m_post.c
23 * \brief Includes required functions for processing the POST/GET/PUT command.
24 * \version $Id$
25 */
26
27 #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 /*
36 ** mr_dumb_proxy
37 ** parv[0] = command
38 ** parv[1] = comment
39 */
40 static int
41 mr_dumb_proxy(struct Client *client_p, struct Client *source_p,
42 int parc, char *parv[])
43 {
44 sendto_realops_flags(UMODE_REJ, L_ALL, SEND_NOTICE,
45 "HTTP Proxy disconnected: [%s@%s]",
46 client_p->username, client_p->host);
47 exit_client(source_p, source_p, "Client Exit");
48 return 0;
49 }
50
51 static struct Message post_msgtab =
52 {
53 "POST", 0, 0, 0, MAXPARA, MFLG_SLOW, 0,
54 { mr_dumb_proxy, m_ignore, m_ignore, m_ignore, m_ignore, m_ignore }
55 };
56
57 static struct Message get_msgtab =
58 {
59 "GET", 0, 0, 0, MAXPARA, MFLG_SLOW, 0,
60 { mr_dumb_proxy, m_ignore, m_ignore, m_ignore, m_ignore, m_ignore }
61 };
62
63 static struct Message put_msgtab =
64 {
65 "PUT", 0, 0, 0, MAXPARA, MFLG_SLOW, 0,
66 { mr_dumb_proxy, m_ignore, m_ignore, m_ignore, m_ignore, m_ignore }
67 };
68
69 static void
70 module_init(void)
71 {
72 mod_add_cmd(&post_msgtab);
73 mod_add_cmd(&get_msgtab);
74 mod_add_cmd(&put_msgtab);
75 }
76
77 static void
78 module_exit(void)
79 {
80 mod_del_cmd(&post_msgtab);
81 mod_del_cmd(&get_msgtab);
82 mod_del_cmd(&put_msgtab);
83 }
84
85 struct module module_entry =
86 {
87 .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 };

Properties

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