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

ModuleNoNickChange Class Reference

Inheritance diagram for ModuleNoNickChange:

Inheritance graph
[legend]
Collaboration diagram for ModuleNoNickChange:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ModuleNoNickChange (InspIRCd *Me)
virtual ~ModuleNoNickChange ()
virtual Version GetVersion ()
 Returns the version number of a Module.
virtual void On005Numeric (std::string &output)
 Called when a 005 numeric is about to be output.
virtual int OnUserPreNick (User *user, const std::string &newnick)
 Called before any nickchange, local or remote.

Private Attributes

NoNicksnn

Detailed Description

Definition at line 46 of file m_nonicks.cpp.


Constructor & Destructor Documentation

ModuleNoNickChange::ModuleNoNickChange InspIRCd Me  )  [inline]
 

Definition at line 50 of file m_nonicks.cpp.

References ModeParser::AddMode(), ModuleManager::Attach(), I_On005Numeric, I_OnUserPreNick, InspIRCd::Modes, InspIRCd::Modules, nn, and Module::ServerInstance.

virtual ModuleNoNickChange::~ModuleNoNickChange  )  [inline, virtual]
 

Definition at line 59 of file m_nonicks.cpp.

References ModeParser::DelMode(), InspIRCd::Modes, nn, and Module::ServerInstance.


Member Function Documentation

virtual Version ModuleNoNickChange::GetVersion  )  [inline, virtual]
 

Returns the version number of a Module.

The method should return a Version object with its version information assigned via Version::Version

Reimplemented from Module.

Definition at line 65 of file m_nonicks.cpp.

References API_VERSION, VF_COMMON, and VF_VENDOR.

virtual void ModuleNoNickChange::On005Numeric std::string output  )  [inline, virtual]
 

Called when a 005 numeric is about to be output.

The module should modify the 005 numeric if needed to indicate its features.

Parameters:
output The 005 string to be modified if neccessary.

Reimplemented from Module.

Definition at line 71 of file m_nonicks.cpp.

References InspIRCd::AddExtBanChar(), and Module::ServerInstance.

virtual int ModuleNoNickChange::OnUserPreNick User user,
const std::string newnick
[inline, virtual]
 

Called before any nickchange, local or remote.

This can be used to implement Q-lines etc. Please note that although you can see remote nickchanges through this function, you should NOT make any changes to the User if the user is a remote user as this may cause a desnyc. check user->server before taking any action (including returning nonzero from the method). If your method returns nonzero, the nickchange is silently forbidden, and it is down to your module to generate some meaninful output.

Parameters:
user The username changing their nick
newnick Their new nickname
Returns:
1 to deny the change, 0 to allow

Reimplemented from Module.

Definition at line 76 of file m_nonicks.cpp.

References CHANOPS_EXEMPT, User::chans, ERR_CANTCHANGENICK, Channel::GetStatus(), IS_LOCAL, Channel::IsExtBanned(), Channel::IsModeSet(), Channel::name, User::nick, Module::ServerInstance, STATUS_OP, and User::WriteNumeric().


Member Data Documentation

NoNicks* ModuleNoNickChange::nn [private]
 

Definition at line 48 of file m_nonicks.cpp.

Referenced by ModuleNoNickChange(), and ~ModuleNoNickChange().


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