ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/ermyth/modules/contrib/cs_ping.C
Revision: 1.4
Committed: Sat Sep 22 14:27:27 2007 UTC (19 years ago) by pippijn
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +3 -3 lines
Log Message:
split up ermyth into ermyth-modules, libermyth (currently just ermyth-util) and ermyth-core

File Contents

# User Rev Content
1 pippijn 1.3 /**
2     * cs_ping.C: Some module TODO
3     *
4 pippijn 1.2 * Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team
5 pippijn 1.3 * Rights to this code are as documented in COPYING.
6     *
7     *
8     * Portions of this file were derived from sources bearing the following license:
9 pippijn 1.2 * Copyright © 2007 Atheme Development Group
10     * Rights to this code are as documented in doc/pod/license.pod.
11     *
12 pippijn 1.4 * $Id: cs_ping.C,v 1.3 2007-09-16 18:54:43 pippijn Exp $
13 pippijn 1.2 */
14    
15 pippijn 1.1 #include "atheme.h"
16 pippijn 1.2 #include <ermyth/module.h>
17    
18 pippijn 1.4 static char const rcsid[] = "$Id: cs_ping.C,v 1.3 2007-09-16 18:54:43 pippijn Exp $";
19 pippijn 1.1
20 pippijn 1.4 REGISTER_MODULE ("chanserv/ping", false, "The Ermyth Team <http://ermyth.xinutec.org>");
21 pippijn 1.1
22     static void cs_cmd_ping (sourceinfo_t *si, int parc, char *parv[]);
23    
24 pippijn 1.2 command_t const cs_ping = { "PING", "Verifies network connectivity by responding with pong.", AC_NONE, 0, cs_cmd_ping };
25 pippijn 1.1
26 pippijn 1.2 E cmdvec cs_cmdtree;
27 pippijn 1.1
28 pippijn 1.2 bool
29     _modinit (module *m)
30 pippijn 1.1 {
31 pippijn 1.2 cs_cmdtree << cs_ping;
32 pippijn 1.1
33 pippijn 1.2 return true;
34 pippijn 1.1 }
35    
36     void
37     _moddeinit ()
38     {
39     cs_cmdtree >> cs_ping;
40     }
41    
42     static void
43     cs_cmd_ping (sourceinfo_t *si, int parc, char *parv[])
44     {
45     command_success_nodata (si, "Pong!");
46     return;
47     }