]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - src/modules/m_check.cpp
15db15de54788794187e22ae1570d721fa6bc0d1
[user/henk/code/inspircd.git] / src / modules / m_check.cpp
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
6  *                       E-mail:
7  *                <brain@chatspike.net>
8  *                <Craig@chatspike.net>
9  *     
10  * Written by Craig Edwards, Craig McLure, and others.
11  * This program is free but copyrighted software; see
12  *            the file COPYING for details.
13  *
14  * ---------------------------------------------------
15  */
16
17 using namespace std;
18
19 #include "users.h"
20 #include "channels.h"
21 #include "modules.h"
22
23 /* $ModDesc: Provides the /check command to retrieve information on a user, channel, or IP address */
24
25 static Server *Srv;
26
27 class cmd_check : public command_t
28 {
29  public:
30         cmd_check() : command_t("CHECK", 'o', 1)
31         {
32                 this->source = "m_check.so";
33         }
34
35         void Handle (char **parameters, int pcnt, userrec *user)
36         {
37
38         }
39 };
40
41
42 class ModuleCheck : public Module
43 {
44  private:
45         cmd_check *mycommand;
46  public:
47         ModuleCheck(Server* Me) : Module::Module(Me)
48         {
49                 Srv = Me;
50                 mycommand = new cmd_check();
51                 Srv->AddCommand(mycommand);
52         }
53         
54         virtual ~ModuleCheck()
55         {
56         }
57         
58         virtual Version GetVersion()
59         {
60                 return Version(1, 0, 0, 0, VF_VENDOR);
61         }
62
63         void Implements(char* List)
64         {
65                 /* we don't hook anything, nothing required */
66         }
67         
68 };
69
70
71
72 class ModuleCheckFactory : public ModuleFactory
73 {
74  public:
75         ModuleCheckFactory()
76         {
77         }
78         
79         ~ModuleCheckFactory()
80         {
81         }
82         
83         virtual Module * CreateModule(Server* Me)
84         {
85                 return new ModuleCheck(Me);
86         }
87         
88 };
89
90 extern "C" void * init_module( void )
91 {
92         return new ModuleCheckFactory;
93 }
94