| 1 |
/* |
| 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 |
* $Id$ |
| 23 |
*/ |
| 24 |
|
| 25 |
#include "stdinc.h" |
| 26 |
#include "handlers.h" |
| 27 |
#include "client.h" |
| 28 |
#include "ircd.h" |
| 29 |
#include "s_conf.h" |
| 30 |
#include "s_serv.h" |
| 31 |
#include "send.h" |
| 32 |
#include "msg.h" |
| 33 |
#include "parse.h" |
| 34 |
#include "modules.h" |
| 35 |
|
| 36 |
static void ms_eob(struct Client*, struct Client*, int, char*[]); |
| 37 |
|
| 38 |
struct Message eob_msgtab = { |
| 39 |
"EOB", 0, 0, 0, MAXPARA, MFLG_SLOW | MFLG_UNREG, 0, |
| 40 |
{m_unregistered, m_ignore, ms_eob, m_ignore, m_ignore, m_ignore} |
| 41 |
}; |
| 42 |
|
| 43 |
void |
| 44 |
_modinit(void) |
| 45 |
{ |
| 46 |
mod_add_cmd(&eob_msgtab); |
| 47 |
} |
| 48 |
|
| 49 |
void |
| 50 |
_moddeinit(void) |
| 51 |
{ |
| 52 |
mod_del_cmd(&eob_msgtab); |
| 53 |
} |
| 54 |
|
| 55 |
const char *_version = "$Revision$"; |
| 56 |
|
| 57 |
/* |
| 58 |
* ms_eob - EOB command handler |
| 59 |
* parv[0] = sender prefix |
| 60 |
* parv[1] = servername |
| 61 |
*/ |
| 62 |
static void |
| 63 |
ms_eob(struct Client *client_p, struct Client *source_p, |
| 64 |
int parc, char *parv[]) |
| 65 |
{ |
| 66 |
sendto_realops_flags(UMODE_ALL, L_ALL, "End of burst from %s (%u seconds)", |
| 67 |
source_p->name, |
| 68 |
(unsigned int)(CurrentTime - source_p->firsttime)); |
| 69 |
SetEob(client_p); |
| 70 |
} |