/[svn]/ircd-hybrid-7.2/modules/m_drop.c
ViewVC logotype

Contents of /ircd-hybrid-7.2/modules/m_drop.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 34 - (show annotations)
Sun Oct 2 21:05:51 2005 UTC (14 years, 9 months ago) by lusky
File MIME type: text/x-chdr
File size: 2388 byte(s)
create 7.2 branch, we can move/rename it as needed.


1 /*
2 * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
3 * m_drop.c: Lets a lazylink indicate it no longer knows a channel.
4 *
5 * Copyright (C) 2002 by the past and present ircd coders, and others.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 * USA
21 *
22 * $Id$
23 */
24
25 #include "stdinc.h"
26 #include "tools.h"
27 #include "channel.h"
28 #include "client.h"
29 #include "common.h"
30 #include "hash.h"
31 #include "irc_string.h"
32 #include "ircd.h"
33 #include "list.h"
34 #include "numeric.h"
35 #include "s_serv.h" /* captab */
36 #include "s_user.h"
37 #include "send.h"
38 #include "handlers.h"
39 #include "msg.h"
40 #include "parse.h"
41 #include "modules.h"
42
43
44 static void ms_drop(struct Client *,struct Client *,int,char **);
45
46 struct Message drop_msgtab = {
47 "DROP", 0, 0, 2, 0, MFLG_SLOW | MFLG_UNREG, 0L,
48 {m_unregistered, m_ignore, ms_drop, m_ignore, m_ignore, m_ignore}
49 };
50 #ifndef STATIC_MODULES
51 void
52 _modinit(void)
53 {
54 mod_add_cmd(&drop_msgtab);
55 }
56
57 void
58 _moddeinit(void)
59 {
60 mod_del_cmd(&drop_msgtab);
61 }
62
63 const char *_version = "$Revision$";
64 #endif
65 /*
66 ** ms_drop
67 ** parv[0] = sender prefix
68 ** parv[1] = channel
69 ** parv[2] = channel password (key)
70 **
71 ** "drop" a channel from consideration on a lazy link
72 */
73 static void
74 ms_drop(struct Client *client_p, struct Client *source_p,
75 int parc, char *parv[])
76 {
77 char *name;
78 struct Channel *chptr;
79
80 if(parc < 2 || *parv[1] == '\0')
81 return;
82
83 name = parv[1];
84
85 #ifdef DEBUGLL
86 sendto_realops(UMODE_ALL, "DROP called by %s for %s", client_p->name, name );
87 #endif
88
89 if((chptr=hash_find_channel(name)) == NULL)
90 return;
91
92 if(client_p->localClient->serverMask) /* JIC */
93 chptr->lazyLinkChannelExists &= ~client_p->localClient->serverMask;
94 return;
95 }

Properties

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

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28