/** * ircd_noprotect.C: Module to disable protect (+a) mode. * * Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team * Rights to this code are as documented in COPYING. * * Module to disable protect (+a) mode. * This will stop Atheme setting this mode by itself, but it can still * be used via OperServ MODE etc. * * * 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_noprotect.C,v 1.5 2007/09/22 14:27:27 pippijn Exp $ */ #include "atheme.h" #include static char const rcsid[] = "$Id: ircd_noprotect.C,v 1.5 2007/09/22 14:27:27 pippijn Exp $"; REGISTER_MODULE ("ircd_noprotect", 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_protect; ircd->uses_protect = false; update_chanacs_flags (); return true; } void _moddeinit () { ircd->uses_protect = oldflag; update_chanacs_flags (); }