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_globops Class Reference

Handle /GLOBOPS. More...

Inheritance diagram for cmd_globops:

Inheritance graph
[legend]
Collaboration diagram for cmd_globops:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 cmd_globops (InspIRCd *Instance)
CmdResult Handle (const char **parameters, int pcnt, userrec *user)
 Handle the command from a user.

Detailed Description

Handle /GLOBOPS.

Definition at line 25 of file m_globops.cpp.


Constructor & Destructor Documentation

cmd_globops::cmd_globops InspIRCd Instance  )  [inline]
 

Definition at line 28 of file m_globops.cpp.

References command_t::source, and command_t::syntax.

00028                                          : command_t(Instance,"GLOBOPS",'o',1)
00029         {
00030                 this->source = "m_globops.so";
00031                 syntax = "<any-text>";
00032         }


Member Function Documentation

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

Handle the command from a user.

Parameters:
parameters The parameters for the command.
pcnt The number of parameters available in 'parameters'
user The user who issued the command.
Returns:
Return CMD_SUCCESS on success, or CMD_FAILURE on failure. If the command succeeds but should remain local to this server, return CMD_LOCALONLY.

Implements command_t.

Definition at line 34 of file m_globops.cpp.

References CMD_SUCCESS, userrec::nick, command_t::ServerInstance, InspIRCd::SNO, and SnomaskManager::WriteToSnoMask().

00035         {
00036                 std::string line = "From " + std::string(user->nick) + ": ";
00037                 for (int i = 0; i < pcnt; i++)
00038                 {
00039                         line = line + std::string(parameters[i]) + " ";
00040                 }
00041                 ServerInstance->SNO->WriteToSnoMask('g',line);
00042 
00043                 /* route it (ofc :p) */
00044                 return CMD_SUCCESS;
00045         }


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