| 1 |
/* |
| 2 |
* Copyright (c) 2008 Jilles Tjoelker |
| 3 |
* Rights to this code are as documented in doc/LICENSE. |
| 4 |
* |
| 5 |
* Module to disable holdnick enforcers. |
| 6 |
*/ |
| 7 |
|
| 8 |
#include "atheme.h" |
| 9 |
|
| 10 |
DECLARE_MODULE_V1 |
| 11 |
( |
| 12 |
"protocol/mixin_noholdnick", false, _modinit, _moddeinit, |
| 13 |
PACKAGE_STRING, |
| 14 |
VENDOR_STRING |
| 15 |
); |
| 16 |
|
| 17 |
int oldflag; |
| 18 |
|
| 19 |
void _modinit(module_t *m) |
| 20 |
{ |
| 21 |
|
| 22 |
if (ircd == NULL) |
| 23 |
{ |
| 24 |
slog(LG_ERROR, "Module %s must be loaded after a protocol module.", m->name); |
| 25 |
m->mflags = MODTYPE_FAIL; |
| 26 |
return; |
| 27 |
} |
| 28 |
oldflag = ircd->flags & IRCD_HOLDNICK; |
| 29 |
ircd->flags &= ~IRCD_HOLDNICK; |
| 30 |
} |
| 31 |
|
| 32 |
void _moddeinit(module_unload_intent_t intent) |
| 33 |
{ |
| 34 |
|
| 35 |
ircd->flags |= oldflag; |
| 36 |
} |
| 37 |
|
| 38 |
/* vim:cinoptions=>s,e0,n0,f0,{0,}0,^0,=s,ps,t0,c3,+s,(2s,us,)20,*30,gs,hs |
| 39 |
* vim:ts=8 |
| 40 |
* vim:sw=8 |
| 41 |
* vim:noexpandtab |
| 42 |
*/ |