| 1 |
adx |
30 |
/* |
| 2 |
|
|
* ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). |
| 3 |
|
|
* m_eob.c: Signifies the end of a server burst. |
| 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 |
knight |
31 |
* $Id$ |
| 23 |
adx |
30 |
*/ |
| 24 |
|
|
|
| 25 |
|
|
#include "stdinc.h" |
| 26 |
|
|
#include "client.h" |
| 27 |
|
|
#include "ircd.h" |
| 28 |
|
|
#include "send.h" |
| 29 |
|
|
#include "parse.h" |
| 30 |
|
|
#include "modules.h" |
| 31 |
michael |
1971 |
#include "s_serv.h" |
| 32 |
adx |
30 |
|
| 33 |
|
|
|
| 34 |
|
|
/* |
| 35 |
|
|
* ms_eob - EOB command handler |
| 36 |
|
|
* parv[0] = sender prefix |
| 37 |
|
|
* parv[1] = servername |
| 38 |
|
|
*/ |
| 39 |
|
|
static void |
| 40 |
|
|
ms_eob(struct Client *client_p, struct Client *source_p, |
| 41 |
|
|
int parc, char *parv[]) |
| 42 |
|
|
{ |
| 43 |
michael |
1219 |
assert(IsServer(source_p)); |
| 44 |
|
|
assert(client_p == source_p); |
| 45 |
|
|
|
| 46 |
|
|
AddFlag(source_p, FLAGS_EOB); |
| 47 |
michael |
1971 |
|
| 48 |
|
|
sendto_server(client_p, CAP_TS6, NOCAPS, |
| 49 |
|
|
":%s EOB", ID(source_p)); |
| 50 |
|
|
sendto_server(client_p, NOCAPS, CAP_TS6, |
| 51 |
|
|
":%s EOB", source_p->name); |
| 52 |
adx |
30 |
} |
| 53 |
michael |
1230 |
|
| 54 |
|
|
static struct Message eob_msgtab = { |
| 55 |
michael |
1569 |
"EOB", 0, 0, 0, MAXPARA, MFLG_SLOW, 0, |
| 56 |
michael |
1230 |
{m_unregistered, m_ignore, ms_eob, m_ignore, m_ignore, m_ignore} |
| 57 |
|
|
}; |
| 58 |
|
|
|
| 59 |
|
|
static void |
| 60 |
|
|
module_init(void) |
| 61 |
|
|
{ |
| 62 |
|
|
mod_add_cmd(&eob_msgtab); |
| 63 |
|
|
} |
| 64 |
|
|
|
| 65 |
|
|
static void |
| 66 |
|
|
module_exit(void) |
| 67 |
|
|
{ |
| 68 |
|
|
mod_del_cmd(&eob_msgtab); |
| 69 |
|
|
} |
| 70 |
|
|
|
| 71 |
|
|
struct module module_entry = { |
| 72 |
|
|
.node = { NULL, NULL, NULL }, |
| 73 |
|
|
.name = NULL, |
| 74 |
|
|
.version = "$Revision$", |
| 75 |
|
|
.handle = NULL, |
| 76 |
|
|
.modinit = module_init, |
| 77 |
|
|
.modexit = module_exit, |
| 78 |
|
|
.flags = 0 |
| 79 |
|
|
}; |