ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/ermyth/modules/gameserv/help.C
Revision: 1.4
Committed: Tue Aug 28 17:08:09 2007 UTC (19 years, 3 months ago) by pippijn
Content type: text/plain
Branch: MAIN
Changes since 1.3: +12 -18 lines
Log Message:
- changed name
- updated the example config to the new system
- added more documentation
- enhanced documentation generators
- added a link to the pdf to the website
- added an RSS feed generator
- transitioned hooks to c++ callbacks
- did various merges with upstream along the way
- added const where appropriate
- removed the old block allocator
- fixed most memory leaks
- transitioned some dictionaries to std::map
- transitioned some lists to std::vector
- made some free functions members where appropriate
- renamed string to dynstr and added a static string ststr
- use NOW instead of time (NULL) if possible
- completely reworked database backends, crypto handlers and protocol handlers
  to use an object factory
- removed the old module system. ermyth does not do any dynamic loading anymore
- fixed most of the build system
- reworked how protocol commands work

File Contents

# User Rev Content
1 pippijn 1.1 /*
2 pippijn 1.4 * Copyright © 2005 Atheme Development Group
3 pippijn 1.2 * Rights to this code are documented in doc/pod/license.pod.
4 pippijn 1.1 *
5     * This file contains routines to handle the MemoServ HELP command.
6     *
7 pippijn 1.4 * $Id: help.C,v 1.3 2007-07-21 13:23:20 pippijn Exp $
8 pippijn 1.1 */
9    
10     #include "atheme.h"
11 pippijn 1.4 #include <ermyth/module.h>
12 pippijn 1.1
13 pippijn 1.4 static char const rcsid[] = "$Id: help.C,v 1.3 2007-07-21 13:23:20 pippijn Exp $";
14 pippijn 1.1
15 pippijn 1.4 REGISTER_MODULE ("gameserv/help", false, "The Ermyth Team <http://ermyth.schmorp.de>");
16 pippijn 1.1
17 pippijn 1.4 E cmdvec gs_cmdtree;
18     E helpvec gs_helptree;
19 pippijn 1.1
20     static void gs_cmd_help (sourceinfo_t *si, int parc, char *parv[]);
21    
22 pippijn 1.4 command_t const gs_help = { "HELP", N_("Displays contextual help information."), AC_NONE, 2, gs_cmd_help };
23 pippijn 1.1
24 pippijn 1.4 bool
25     _modinit (module *m)
26 pippijn 1.1 {
27     gs_cmdtree << gs_help;
28     help_addentry (gs_helptree, "HELP", "help/help", NULL);
29 pippijn 1.4
30     return true;
31 pippijn 1.1 }
32    
33     void
34     _moddeinit ()
35     {
36     gs_cmdtree >> gs_help;
37     help_delentry (gs_helptree, "HELP");
38     }
39    
40     /* HELP <command> [params] */
41     void
42     gs_cmd_help (sourceinfo_t *si, int parc, char *parv[])
43     {
44     char *command = parv[0];
45    
46     if (!command)
47     {
48     command_success_nodata (si, _("***** \2%s Help\2 *****"), gamesvs.nick);
49     command_success_nodata (si, _("\2%s\2 provides games and tools for playing games to the network."), gamesvs.nick);
50     command_success_nodata (si, " ");
51     command_success_nodata (si, _("For more information on a command, type:"));
52     command_success_nodata (si, "\2/%s%s help <command>\2", (ircd->uses_rcommand == false) ? "msg " : "", gamesvs.disp);
53     command_success_nodata (si, " ");
54    
55     command_help (si, gs_cmdtree);
56    
57     command_success_nodata (si, _("***** \2End of Help\2 *****"));
58     return;
59     }
60    
61     /* take the command through the hash table */
62     help_display (si, command, gs_helptree);
63     }
64    
65     /* vim:cinoptions=>s,e0,n0,f0,{0,}0,^0,=s,ps,t0,c3,+s,(2s,us,)20,*30,gs,hs
66     * vim:ts=8
67     * vim:sw=8
68     * vim:noexpandtab
69     */