/** * ircd_nohalfops.C: Module to disable halfop (+h) mode. * * Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team * Rights to this code are as documented in COPYING. * * Module to disable halfop (+h) mode. * This will stop Atheme setting this mode by itself, but it can still * be used via OperServ MODE etc. * * Note: this module does not work with the halfops autodetection * in the charybdis protocol module. * * * Portions of this file were derived from sources bearing the following license: * Copyright © 2006 Jilles Tjoelker * Rights to this code are as documented in doc/pod/license.pod. * * $Id: ircd_nohalfops.C,v 1.5 2007/09/22 14:27:27 pippijn Exp $ */ #include "atheme.h" #include static char const rcsid[] = "$Id: ircd_nohalfops.C,v 1.5 2007/09/22 14:27:27 pippijn Exp $"; REGISTER_MODULE ("ircd_nohalfops", false, "The Ermyth Team "); static bool oldflag; bool _modinit (module *m) { if (ircd == NULL) { slog (LG_ERROR, "Module %s must be loaded after a protocol module.", m->name); return false; } oldflag = ircd->uses_halfops; ircd->uses_halfops = false; update_chanacs_flags (); return true; } void _moddeinit () { ircd->uses_halfops = oldflag; update_chanacs_flags (); }