]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - src/cmd_loadmodule.cpp
Decide that it wasn't quite appropriate :(
[user/henk/code/inspircd.git] / src / cmd_loadmodule.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 "inspircd_config.h"
20 #include "inspircd.h"
21 #include "inspircd_io.h"
22 #include <string>
23 #include <map>
24 #include <vector>
25 #include <deque>
26 #include "users.h"
27 #include "ctables.h"
28 #include "globals.h"
29 #include "modules.h"
30 #include "dynamic.h"
31 #include "message.h"
32 #include "commands.h"
33 #include "inspstring.h"
34 #include "helperfuncs.h"
35 #include "hashcomp.h"
36 #include "typedefs.h"
37 #include "cmd_loadmodule.h"
38
39 extern InspIRCd* ServerInstance;
40
41 void cmd_loadmodule::Handle (char **parameters, int pcnt, userrec *user)
42 {
43         if (ServerInstance->LoadModule(parameters[0]))
44         {
45                 WriteOpers("*** NEW MODULE: %s",parameters[0]);
46                 WriteServ(user->fd,"975 %s %s :Module successfully loaded.",user->nick, parameters[0]);
47         }
48         else
49         {
50                 WriteServ(user->fd,"974 %s %s :Failed to load module: %s",user->nick, parameters[0],ServerInstance->ModuleError());
51         }
52 }
53
54