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

ModeUserServerNoticeMask Class Reference

User mode +n. More...

#include <umode_s.h>

Inheritance diagram for ModeUserServerNoticeMask:

Inheritance graph
[legend]
Collaboration diagram for ModeUserServerNoticeMask:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ModeUserServerNoticeMask (InspIRCd *Instance)
ModeAction OnModeChange (User *source, User *dest, Channel *channel, std::string &parameter, bool adding, bool servermode)
 Called when a mode change for your mode occurs.
void OnParameterMissing (User *user, User *dest, Channel *channel)
 In the event that the mode should be given a parameter, and no parameter was provided, this method is called.
std::string GetUserParameter (User *user)
 For user modes, return the current parameter, if any.

Detailed Description

User mode +n.

Definition at line 20 of file umode_s.h.


Constructor & Destructor Documentation

ModeUserServerNoticeMask::ModeUserServerNoticeMask InspIRCd Instance  ) 
 

Definition at line 20 of file umode_s.cpp.


Member Function Documentation

std::string ModeUserServerNoticeMask::GetUserParameter User user  )  [virtual]
 

For user modes, return the current parameter, if any.

Reimplemented from ModeHandler.

Definition at line 50 of file umode_s.cpp.

References User::FormatNoticeMasks().

ModeAction ModeUserServerNoticeMask::OnModeChange User source,
User dest,
Channel channel,
std::string parameter,
bool  adding,
bool  servermode
[virtual]
 

Called when a mode change for your mode occurs.

Parameters:
source Contains the user setting the mode.
dest For usermodes, contains the destination user the mode is being set on. For channelmodes, this is an undefined value.
channel For channel modes, contains the destination channel the modes are being set on. For usermodes, this is an undefined value.
parameter The parameter for your mode, if you indicated that your mode requires a parameter when being set or unset. Note that if you alter this value, the new value becomes the one displayed and send out to the network, also, if you set this to an empty string but you specified your mode REQUIRES a parameter, this is equivalent to returning MODEACTION_DENY and will prevent the mode from being displayed.
adding This value is true when the mode is being set, or false when it is being unset.
Returns:
MODEACTION_ALLOW to allow the mode, or MODEACTION_DENY to prevent the mode, also see the description of 'parameter'.

Reimplemented from ModeHandler.

Definition at line 24 of file umode_s.cpp.

References MODEACTION_ALLOW, MODEACTION_DENY, User::modes, User::ProcessNoticeMasks(), User::snomasks, and UM_SNOMASK.

void ModeUserServerNoticeMask::OnParameterMissing User user,
User dest,
Channel channel
[virtual]
 

In the event that the mode should be given a parameter, and no parameter was provided, this method is called.

This allows you to give special information to the user, or handle this any way you like.

Parameters:
user The user issuing the mode change
dest For user mode changes, the target of the mode. For channel mode changes, NULL.
channel For channel mode changes, the target of the mode. For user mode changes, NULL.

Reimplemented from ModeHandler.

Definition at line 58 of file umode_s.cpp.

References User::nick, and User::WriteServ().


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