/** * restart.C: This file contains functionality which implements the OperServ RAW command. * * Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team * Rights to this code are as documented in COPYING. * * * Portions of this file were derived from sources bearing the following license: * Copyright © 2005-2006 Atheme Development Group * Rights to this code are documented in doc/pod/license.pod. * * $Id: restart.C,v 1.7 2007/09/22 14:27:28 pippijn Exp $ */ #include "atheme.h" #include #include static char const rcsid[] = "$Id: restart.C,v 1.7 2007/09/22 14:27:28 pippijn Exp $"; REGISTER_MODULE ("operserv/restart", false, "The Ermyth Team "); static void os_cmd_restart (sourceinfo_t *si, int parc, char *parv[]); command_t const os_restart = { "RESTART", N_("Restart services."), PRIV_ADMIN, 0, os_cmd_restart }; E cmdvec os_cmdtree; E helpvec os_helptree; bool _modinit (module *m) { os_cmdtree << os_restart; help_addentry (os_helptree, "RESTART", "help/operserv/restart", NULL); return true; } void _moddeinit () { os_cmdtree >> os_restart; help_delentry (os_helptree, "RESTART"); } static void os_cmd_restart (sourceinfo_t *si, int parc, char *parv[]) { snoop ("UPDATE: \2%s\2", get_oper_name (si)); wallops ("Updating database by request of \2%s\2.", get_oper_name (si)); expire_check (NULL); backend->save (); logcommand (si, CMDLOG_ADMIN, "RESTART"); snoop ("RESTART: \2%s\2", get_oper_name (si)); wallops ("Restarting by request of \2%s\2.", get_oper_name (si)); runflags |= RF_RESTART; } /* vim:cinoptions=>s,e0,n0,f0,{0,}0,^0,=s,ps,t0,c3,+s,(2s,us,)20,*30,gs,hs * vim:ts=8 * vim:sw=8 * vim:noexpandtab */