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

CommandWatch Class Reference

Handle /WATCH. More...

Inheritance diagram for CommandWatch:

Inheritance graph
[legend]
Collaboration diagram for CommandWatch:

Collaboration graph
[legend]
List of all members.

Public Member Functions

CmdResult remove_watch (User *user, const char *nick)
CmdResult add_watch (User *user, const char *nick)
 CommandWatch (InspIRCd *Instance, unsigned int &maxwatch)
CmdResult Handle (const std::vector< std::string > &parameters, User *user)
 Handle the command from a user.

Private Attributes

unsigned int & MAX_WATCH

Detailed Description

Handle /WATCH.

Definition at line 133 of file m_watch.cpp.


Constructor & Destructor Documentation

CommandWatch::CommandWatch InspIRCd Instance,
unsigned int &  maxwatch
[inline]
 

Definition at line 258 of file m_watch.cpp.

References Command::source, Command::syntax, TR_END, TR_TEXT, and TRANSLATE2.


Member Function Documentation

CmdResult CommandWatch::add_watch User user,
const char *  nick
[inline]
 

Definition at line 193 of file m_watch.cpp.

References classbase::age, User::awaytime, CMD_FAILURE, InspIRCd::Config, ConvToStr(), User::dhost, Extensible::Extend(), InspIRCd::FindNick(), Extensible::GetExt(), User::ident, IS_AWAY, InspIRCd::IsNick, ServerConfig::Limits, MAX_WATCH, User::nick, ServerLimits::NickMax, Command::ServerInstance, User::Visibility, VisData::VisibleTo(), whos_watching_me, and User::WriteNumeric().

Referenced by Handle().

CmdResult CommandWatch::Handle const std::vector< std::string > &  parameters,
User user
[inline, virtual]
 

Handle the command from a user.

Parameters:
parameters The parameters for the command.
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.

Definition at line 265 of file m_watch.cpp.

References add_watch(), User::awaytime, CMD_FAILURE, User::dhost, InspIRCd::FindNick(), Extensible::GetExt(), User::ident, IS_AWAY, User::nick, remove_watch(), Command::ServerInstance, Extensible::Shrink(), whos_watching_me, and User::WriteNumeric().

CmdResult CommandWatch::remove_watch User user,
const char *  nick
[inline]
 

Definition at line 137 of file m_watch.cpp.

References CMD_FAILURE, InspIRCd::Config, Extensible::GetExt(), InspIRCd::IsNick, ServerConfig::Limits, User::nick, ServerLimits::NickMax, Command::ServerInstance, Extensible::Shrink(), whos_watching_me, and User::WriteNumeric().

Referenced by Handle().


Member Data Documentation

unsigned int& CommandWatch::MAX_WATCH [private]
 

Definition at line 135 of file m_watch.cpp.

Referenced by add_watch().


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