The InspIRCd Project
Home | Developers | Wiki | Forums | Bug Tracker | SVN | Download | Blog | Stats
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

cmd_loadmodule Class Reference

Handle /LOADMODULE. More...

#include <cmd_loadmodule.h>

Inheritance diagram for cmd_loadmodule:

Inheritance graph
[legend]
Collaboration diagram for cmd_loadmodule:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 cmd_loadmodule (InspIRCd *Instance)
 Constructor for loadmodule.
CmdResult Handle (const char **parameters, int pcnt, userrec *user)
 Handle command.

Detailed Description

Handle /LOADMODULE.

These command handlers can be reloaded by the core, and handle basic RFC1459 commands. Commands within modules work the same way, however, they can be fully unloaded, where these may not.

Definition at line 27 of file cmd_loadmodule.h.


Constructor & Destructor Documentation

cmd_loadmodule::cmd_loadmodule InspIRCd Instance  )  [inline]
 

Constructor for loadmodule.

Definition at line 32 of file cmd_loadmodule.h.

References command_t::syntax.

00032 : command_t(Instance,"LOADMODULE",'o',1) { syntax = "<modulename>"; }


Member Function Documentation

CmdResult cmd_loadmodule::Handle const char **  parameters,
int  pcnt,
userrec user
[virtual]
 

Handle command.

Parameters:
parameters The parameters to the comamnd
pcnt The number of parameters passed to teh command
user The user issuing the command
Returns:
A value from CmdResult to indicate command success or failure.

Implements command_t.

Definition at line 25 of file cmd_loadmodule.cpp.

References CMD_FAILURE, CMD_SUCCESS, InspIRCd::LoadModule(), InspIRCd::ModuleError(), userrec::nick, command_t::ServerInstance, InspIRCd::WriteOpers(), and userrec::WriteServ().

00026 {
00027         if (ServerInstance->LoadModule(parameters[0]))
00028         {
00029                 ServerInstance->WriteOpers("*** NEW MODULE: %s loaded %s",user->nick, parameters[0]);
00030                 user->WriteServ("975 %s %s :Module successfully loaded.",user->nick, parameters[0]);
00031                 return CMD_SUCCESS;
00032         }
00033         else
00034         {
00035                 user->WriteServ("974 %s %s :Failed to load module: %s",user->nick, parameters[0],ServerInstance->ModuleError());
00036                 return CMD_FAILURE;
00037         }
00038 }


The documentation for this class was generated from the following files: