/** * raw.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: raw.C,v 1.8 2007/09/22 14:27:28 pippijn Exp $ */ #include "atheme.h" #include #include "uplink.h" static char const rcsid[] = "$Id: raw.C,v 1.8 2007/09/22 14:27:28 pippijn Exp $"; REGISTER_MODULE ("operserv/raw", false, "The Ermyth Team "); static void os_cmd_raw (sourceinfo_t *si, int parc, char *parv[]); command_t const os_raw = { "RAW", N_("Sends data to the uplink."), PRIV_ADMIN, 1, os_cmd_raw }; E cmdvec os_cmdtree; E helpvec os_helptree; bool _modinit (module *m) { os_cmdtree << os_raw; help_addentry (os_helptree, "RAW", "help/operserv/raw", NULL); return true; } void _moddeinit () { os_cmdtree >> os_raw; help_delentry (os_helptree, "RAW"); } static void os_cmd_raw (sourceinfo_t *si, int parc, char *parv[]) { char *s = parv[0]; if (!config_options.raw) return; if (!s) { command_fail (si, fault::needmoreparams, STR_INSUFFICIENT_PARAMS, "RAW"); command_fail (si, fault::needmoreparams, _("Syntax: RAW ")); return; } snoop ("RAW: \"%s\" by \2%s\2", s, get_oper_name (si)); logcommand (si, CMDLOG_ADMIN, "RAW %s", s); sts ("%s", s); } /* 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 */