| 19 |
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
| 20 |
|
* USA |
| 21 |
|
* |
| 22 |
< |
* $Id: m_eob.c,v 1.35 2005/04/26 13:36:09 michael Exp $ |
| 22 |
> |
* $Id$ |
| 23 |
|
*/ |
| 24 |
|
|
| 25 |
|
#include "stdinc.h" |
| 26 |
|
#include "handlers.h" |
| 27 |
|
#include "client.h" |
| 28 |
|
#include "ircd.h" |
| 29 |
– |
#include "numeric.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" |
| 36 |
– |
#include <stdlib.h> |
| 35 |
|
|
| 38 |
– |
static void ms_eob(struct Client*, struct Client*, int, char**); |
| 39 |
– |
|
| 40 |
– |
struct Message eob_msgtab = { |
| 41 |
– |
"EOB", 0, 0, 0, 0, MFLG_SLOW | MFLG_UNREG, 0, |
| 42 |
– |
{m_unregistered, m_ignore, ms_eob, m_ignore, m_ignore, m_ignore} |
| 43 |
– |
}; |
| 44 |
– |
#ifndef STATIC_MODULES |
| 45 |
– |
void |
| 46 |
– |
_modinit(void) |
| 47 |
– |
{ |
| 48 |
– |
mod_add_cmd(&eob_msgtab); |
| 49 |
– |
} |
| 50 |
– |
|
| 51 |
– |
void |
| 52 |
– |
_moddeinit(void) |
| 53 |
– |
{ |
| 54 |
– |
mod_del_cmd(&eob_msgtab); |
| 55 |
– |
} |
| 56 |
– |
|
| 57 |
– |
const char *_version = "$Revision: 1.35 $"; |
| 58 |
– |
#endif |
| 36 |
|
|
| 37 |
|
/* |
| 38 |
|
* ms_eob - EOB command handler |
| 43 |
|
ms_eob(struct Client *client_p, struct Client *source_p, |
| 44 |
|
int parc, char *parv[]) |
| 45 |
|
{ |
| 46 |
< |
sendto_realops_flags(UMODE_ALL, L_ALL, "End of burst from %s (%u seconds)", |
| 47 |
< |
source_p->name, |
| 48 |
< |
(unsigned int)(CurrentTime - source_p->firsttime)); |
| 49 |
< |
SetEob(client_p); |
| 46 |
> |
assert(IsServer(source_p)); |
| 47 |
> |
assert(client_p == source_p); |
| 48 |
> |
|
| 49 |
> |
sendto_realops_flags(UMODE_ALL, L_ALL, "End of burst from %s (%u seconds)", |
| 50 |
> |
source_p->name, |
| 51 |
> |
(unsigned int)(CurrentTime - source_p->firsttime)); |
| 52 |
> |
AddFlag(source_p, FLAGS_EOB); |
| 53 |
|
} |
| 54 |
+ |
|
| 55 |
+ |
static struct Message eob_msgtab = { |
| 56 |
+ |
"EOB", 0, 0, 0, MAXPARA, MFLG_SLOW | MFLG_UNREG, 0, |
| 57 |
+ |
{m_unregistered, m_ignore, ms_eob, m_ignore, m_ignore, m_ignore} |
| 58 |
+ |
}; |
| 59 |
+ |
|
| 60 |
+ |
static void |
| 61 |
+ |
module_init(void) |
| 62 |
+ |
{ |
| 63 |
+ |
mod_add_cmd(&eob_msgtab); |
| 64 |
+ |
} |
| 65 |
+ |
|
| 66 |
+ |
static void |
| 67 |
+ |
module_exit(void) |
| 68 |
+ |
{ |
| 69 |
+ |
mod_del_cmd(&eob_msgtab); |
| 70 |
+ |
} |
| 71 |
+ |
|
| 72 |
+ |
struct module module_entry = { |
| 73 |
+ |
.node = { NULL, NULL, NULL }, |
| 74 |
+ |
.name = NULL, |
| 75 |
+ |
.version = "$Revision$", |
| 76 |
+ |
.handle = NULL, |
| 77 |
+ |
.modinit = module_init, |
| 78 |
+ |
.modexit = module_exit, |
| 79 |
+ |
.flags = 0 |
| 80 |
+ |
}; |