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

CommandAccept Class Reference

Inheritance diagram for CommandAccept:

Inheritance graph
[legend]
Collaboration diagram for CommandAccept:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CommandAccept (InspIRCd *Instance, unsigned int &max)
virtual void EncodeParameter (std::string &parameter, int index)
 Encode a parameter for server->server transmission.
CmdResult Handle (const std::vector< std::string > &parameters, User *user)
 Will take any number of nicks (up to MaxTargets), which can be seperated by commas.
void ListAccept (User *user)
bool AddAccept (User *user, User *whotoadd, bool quiet)
bool RemoveAccept (User *user, User *whotoremove, bool quiet)

Private Attributes

unsigned int & maxaccepts

Detailed Description

Definition at line 123 of file m_callerid.cpp.


Constructor & Destructor Documentation

CommandAccept::CommandAccept InspIRCd Instance,
unsigned int &  max
[inline]
 

Definition at line 128 of file m_callerid.cpp.

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


Member Function Documentation

bool CommandAccept::AddAccept User user,
User whotoadd,
bool  quiet
[inline]
 

Definition at line 225 of file m_callerid.cpp.

References callerid_data::accepting, GetData(), maxaccepts, User::nick, User::WriteNumeric(), and User::WriteServ().

Referenced by Handle().

virtual void CommandAccept::EncodeParameter std::string parameter,
int  index
[inline, virtual]
 

Encode a parameter for server->server transmission.

Used for parameters for which the translation type is TR_CUSTOM.

Parameters:
parameter The parameter to encode. Can be modified in place.
index The parameter index (0 == first parameter).

Reimplemented from Command.

Definition at line 135 of file m_callerid.cpp.

References InspIRCd::FindNick(), irc::sepstream::GetToken(), Command::ServerInstance, and User::uuid.

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

Will take any number of nicks (up to MaxTargets), which can be seperated by commas.

  • in front of any nick removes, and an * lists. This effectively means you can do: /accept nick1,nick2,nick3,* to add 3 nicks and then show your list

Implements Command.

Definition at line 178 of file m_callerid.cpp.

References AddAccept(), CMD_FAILURE, CMD_LOCALONLY, CMD_SUCCESS, InspIRCd::FindNick(), IS_LOCAL, ListAccept(), CommandParser::LoopCall(), InspIRCd::Parser, RemoveAccept(), Command::ServerInstance, and User::WriteNumeric().

void CommandAccept::ListAccept User user  )  [inline]
 

Definition at line 214 of file m_callerid.cpp.

References callerid_data::accepting, GetData(), User::nick, and User::WriteNumeric().

Referenced by Handle().

bool CommandAccept::RemoveAccept User user,
User whotoremove,
bool  quiet
[inline]
 

Definition at line 247 of file m_callerid.cpp.

References callerid_data::accepting, GetData(), User::nick, User::WriteNumeric(), and User::WriteServ().

Referenced by Handle().


Member Data Documentation

unsigned int& CommandAccept::maxaccepts [private]
 

Definition at line 126 of file m_callerid.cpp.

Referenced by AddAccept().


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