ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/ermyth/modules/contrib/cs_ping.C
Revision: 1.2
Committed: Tue Aug 28 17:08:09 2007 UTC (19 years, 1 month ago) by pippijn
Content type: text/plain
Branch: MAIN
Changes since 1.1: +20 -9 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.2 /*
2     * Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team
3     * Copyright © 2007 Atheme Development Group
4     * Rights to this code are as documented in doc/pod/license.pod.
5     *
6     * Some module TODO
7     *
8     * $Id: jsonrpc.C,v 1.4 2007-07-25 00:03:21 pippijn Exp $
9     */
10    
11 pippijn 1.1 #include "atheme.h"
12 pippijn 1.2 #include <ermyth/module.h>
13    
14     static char const rcsid[] = "$Id$";
15 pippijn 1.1
16 pippijn 1.2 REGISTER_MODULE ("chanserv/ping", false, "The Ermyth Team <http://ermyth.schmorp.de>");
17 pippijn 1.1
18     static void cs_cmd_ping (sourceinfo_t *si, int parc, char *parv[]);
19    
20 pippijn 1.2 command_t const cs_ping = { "PING", "Verifies network connectivity by responding with pong.", AC_NONE, 0, cs_cmd_ping };
21 pippijn 1.1
22 pippijn 1.2 E cmdvec cs_cmdtree;
23 pippijn 1.1
24 pippijn 1.2 bool
25     _modinit (module *m)
26 pippijn 1.1 {
27 pippijn 1.2 cs_cmdtree << cs_ping;
28 pippijn 1.1
29 pippijn 1.2 return true;
30 pippijn 1.1 }
31    
32     void
33     _moddeinit ()
34     {
35     cs_cmdtree >> cs_ping;
36     }
37    
38     static void
39     cs_cmd_ping (sourceinfo_t *si, int parc, char *parv[])
40     {
41     command_success_nodata (si, "Pong!");
42     return;
43     }