1 |
/** |
2 |
* cs_ping.C: Some module TODO |
3 |
* |
4 |
* Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team |
5 |
* 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 |
* Copyright © 2007 Atheme Development Group |
10 |
* Rights to this code are as documented in doc/pod/license.pod. |
11 |
* |
12 |
* $Id: cs_ping.C,v 1.3 2007-09-16 18:54:43 pippijn Exp $ |
13 |
*/ |
14 |
|
15 |
#include "atheme.h" |
16 |
#include <ermyth/module.h> |
17 |
|
18 |
static char const rcsid[] = "$Id: cs_ping.C,v 1.3 2007-09-16 18:54:43 pippijn Exp $"; |
19 |
|
20 |
REGISTER_MODULE ("chanserv/ping", false, "The Ermyth Team <http://ermyth.xinutec.org>"); |
21 |
|
22 |
static void cs_cmd_ping (sourceinfo_t *si, int parc, char *parv[]); |
23 |
|
24 |
command_t const cs_ping = { "PING", "Verifies network connectivity by responding with pong.", AC_NONE, 0, cs_cmd_ping }; |
25 |
|
26 |
E cmdvec cs_cmdtree; |
27 |
|
28 |
bool |
29 |
_modinit (module *m) |
30 |
{ |
31 |
cs_cmdtree << cs_ping; |
32 |
|
33 |
return true; |
34 |
} |
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 |
} |