/** * update.C: This file contains functionality which implements the OperServ UPDATE 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: update.C,v 1.7 2007/09/22 14:27:28 pippijn Exp $ */ #include "atheme.h" #include #include static char const rcsid[] = "$Id: update.C,v 1.7 2007/09/22 14:27:28 pippijn Exp $"; REGISTER_MODULE ("operserv/update", false, "The Ermyth Team "); static void os_cmd_update (sourceinfo_t *si, int parc, char *parv[]); command_t const os_update = { "UPDATE", N_("Flushes services database to disk."), PRIV_ADMIN, 0, os_cmd_update }; E cmdvec os_cmdtree; E helpvec os_helptree; bool _modinit (module *m) { os_cmdtree << os_update; help_addentry (os_helptree, "UPDATE", "help/operserv/update", NULL); return true; } void _moddeinit () { os_cmdtree >> os_update; help_delentry (os_helptree, "UPDATE"); } void os_cmd_update (sourceinfo_t *si, int parc, char *parv[]) { snoop ("UPDATE: \2%s\2", get_oper_name (si)); logcommand (si, CMDLOG_ADMIN, "UPDATE"); wallops ("Updating database by request of \2%s\2.", get_oper_name (si)); expire_check (NULL); backend->save (); /* backend->save () will wallops/snoop/log the error */ command_success_nodata (si, _("UPDATE completed.")); }