ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/modules/m_drop.c
Revision: 69
Committed: Tue Oct 4 16:09:51 2005 UTC (20 years, 9 months ago) by adx
Content type: text/x-csrc
File size: 2327 byte(s)
Log Message:
- splitted ircd/libio, all headers connected with libio sources have been
  moved for internal use only. To use libio interface, include "libio.h"
  (which is already done in "stdinc.h")


File Contents

# Content
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 "channel.h"
27 #include "client.h"
28 #include "common.h"
29 #include "hash.h"
30 #include "ircd.h"
31 #include "numeric.h"
32 #include "s_serv.h" /* captab */
33 #include "s_user.h"
34 #include "send.h"
35 #include "handlers.h"
36 #include "msg.h"
37 #include "parse.h"
38 #include "modules.h"
39
40
41 static void ms_drop(struct Client *,struct Client *,int,char **);
42
43 struct Message drop_msgtab = {
44 "DROP", 0, 0, 2, 0, MFLG_SLOW | MFLG_UNREG, 0L,
45 {m_unregistered, m_ignore, ms_drop, m_ignore, m_ignore, m_ignore}
46 };
47 #ifndef STATIC_MODULES
48 void
49 _modinit(void)
50 {
51 mod_add_cmd(&drop_msgtab);
52 }
53
54 void
55 _moddeinit(void)
56 {
57 mod_del_cmd(&drop_msgtab);
58 }
59
60 const char *_version = "$Revision$";
61 #endif
62 /*
63 ** ms_drop
64 ** parv[0] = sender prefix
65 ** parv[1] = channel
66 ** parv[2] = channel password (key)
67 **
68 ** "drop" a channel from consideration on a lazy link
69 */
70 static void
71 ms_drop(struct Client *client_p, struct Client *source_p,
72 int parc, char *parv[])
73 {
74 char *name;
75 struct Channel *chptr;
76
77 if(parc < 2 || *parv[1] == '\0')
78 return;
79
80 name = parv[1];
81
82 #ifdef DEBUGLL
83 sendto_realops(UMODE_ALL, "DROP called by %s for %s", client_p->name, name );
84 #endif
85
86 if((chptr=hash_find_channel(name)) == NULL)
87 return;
88
89 if(client_p->localClient->serverMask) /* JIC */
90 chptr->lazyLinkChannelExists &= ~client_p->localClient->serverMask;
91 return;
92 }

Properties

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