ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ermyth/modules/chanserv/version.C
Revision: 1.5
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.4: +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.4 /**
2     * version.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 pippijn 1.3 * Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team
10     * Copyright © 2007 Atheme Development Group
11     * Rights to this code are as documented in doc/pod/license.pod.
12     *
13 pippijn 1.5 * $Id: version.C,v 1.4 2007-09-16 18:54:43 pippijn Exp $
14 pippijn 1.3 */
15    
16 pippijn 1.1 #include "atheme.h"
17 pippijn 1.3 #include <ermyth/module.h>
18 pippijn 1.1
19 pippijn 1.5 static char const rcsid[] = "$Id: version.C,v 1.4 2007-09-16 18:54:43 pippijn Exp $";
20 pippijn 1.1
21 pippijn 1.5 REGISTER_MODULE ("chanserv/version", false, "The Ermyth Team <http://ermyth.xinutec.org>");
22 pippijn 1.1
23     static void cs_cmd_version (sourceinfo_t *si, int parc, char *parv[]);
24    
25 pippijn 1.3 command_t const cs_version = { "VERSION", N_("Displays version information of the services."), AC_NONE, 0, cs_cmd_version };
26 pippijn 1.1
27 pippijn 1.3 E cmdvec cs_cmdtree;
28 pippijn 1.1
29 pippijn 1.3 bool
30     _modinit (module *m)
31 pippijn 1.1 {
32 pippijn 1.3 cs_cmdtree << cs_version;
33 pippijn 1.1
34 pippijn 1.3 return true;
35 pippijn 1.1 }
36    
37     void
38     _moddeinit ()
39     {
40     cs_cmdtree >> cs_version;
41     }
42    
43     static void
44     cs_cmd_version (sourceinfo_t *si, int parc, char *parv[])
45     {
46     char buf[BUFSIZE];
47     snprintf (buf, BUFSIZE, PACKAGE_NAME " %s #%s", version, generation);
48     command_success_string (si, buf, "%s", buf);
49     return;
50     }