ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.1.x/modules/m_eob.c
Revision: 1618
Committed: Tue Oct 30 21:04:38 2012 UTC (13 years, 11 months ago) by michael
Content type: text/x-csrc
Original Path: ircd-hybrid/trunk/modules/m_eob.c
File size: 2079 byte(s)
Log Message:
- Made m_globops() and ms_globops() use sendto_realops_flags()
- Added message-type parameter to sendto_realops_flags() which can be one of
  SEND_NOTICE, SEND_GLOBAL, SEND_LOCOPS
- Forward-port -r1617

File Contents

# User Rev Content
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    
32    
33     /*
34     * ms_eob - EOB command handler
35     * parv[0] = sender prefix
36     * parv[1] = servername
37     */
38     static void
39     ms_eob(struct Client *client_p, struct Client *source_p,
40     int parc, char *parv[])
41     {
42 michael 1219 assert(IsServer(source_p));
43     assert(client_p == source_p);
44    
45 michael 1618 sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
46     "End of burst from %s (%u seconds)",
47 michael 1219 source_p->name,
48 michael 1241 (unsigned int)(CurrentTime - source_p->localClient->firsttime));
49 michael 1219 AddFlag(source_p, FLAGS_EOB);
50 adx 30 }
51 michael 1230
52     static struct Message eob_msgtab = {
53 michael 1569 "EOB", 0, 0, 0, MAXPARA, MFLG_SLOW, 0,
54 michael 1230 {m_unregistered, m_ignore, ms_eob, m_ignore, m_ignore, m_ignore}
55     };
56    
57     static void
58     module_init(void)
59     {
60     mod_add_cmd(&eob_msgtab);
61     }
62    
63     static void
64     module_exit(void)
65     {
66     mod_del_cmd(&eob_msgtab);
67     }
68    
69     struct module module_entry = {
70     .node = { NULL, NULL, NULL },
71     .name = NULL,
72     .version = "$Revision$",
73     .handle = NULL,
74     .modinit = module_init,
75     .modexit = module_exit,
76     .flags = 0
77     };

Properties

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