/** * help.C: This file contains routines to handle the MemoServ HELP 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 Atheme Development Group * Rights to this code are documented in doc/pod/license.pod. * * $Id: help.C,v 1.6 2007/09/22 14:27:27 pippijn Exp $ */ #include "atheme.h" #include static char const rcsid[] = "$Id: help.C,v 1.6 2007/09/22 14:27:27 pippijn Exp $"; REGISTER_MODULE ("gameserv/help", false, "The Ermyth Team "); E cmdvec gs_cmdtree; E helpvec gs_helptree; static void gs_cmd_help (sourceinfo_t *si, int parc, char *parv[]); command_t const gs_help = { "HELP", N_("Displays contextual help information."), AC_NONE, 2, gs_cmd_help }; bool _modinit (module *m) { gs_cmdtree << gs_help; help_addentry (gs_helptree, "HELP", "help/help", NULL); return true; } void _moddeinit () { gs_cmdtree >> gs_help; help_delentry (gs_helptree, "HELP"); } /* HELP [params] */ void gs_cmd_help (sourceinfo_t *si, int parc, char *parv[]) { char *command = parv[0]; if (!command) { command_success_nodata (si, _("***** \2%s Help\2 *****"), gamesvs.nick); command_success_nodata (si, _("\2%s\2 provides games and tools for playing games to the network."), gamesvs.nick); command_success_nodata (si, " "); command_success_nodata (si, _("For more information on a command, type:")); command_success_nodata (si, "\2/%s%s help \2", (ircd->uses_rcommand == false) ? "msg " : "", gamesvs.disp); command_success_nodata (si, " "); command_help (si, gs_cmdtree); command_success_nodata (si, _("***** \2End of Help\2 *****")); return; } /* take the command through the hash table */ help_display (si, command, gs_helptree); } /* 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 */