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

ModuleNickFlood Class Reference

Inheritance diagram for ModuleNickFlood:

Inheritance graph
[legend]
Collaboration diagram for ModuleNickFlood:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ModuleNickFlood (InspIRCd *Me)
virtual int OnUserPreNick (User *user, const std::string &newnick)
 Called before any nickchange, local or remote.
void OnChannelDelete (Channel *chan)
 Called whenever a channel is deleted, either by QUIT, KICK or PART.
virtual ~ModuleNickFlood ()
virtual Version GetVersion ()
 Returns the version number of a Module.

Private Attributes

NickFloodjf

Detailed Description

Definition at line 207 of file m_nickflood.cpp.


Constructor & Destructor Documentation

ModuleNickFlood::ModuleNickFlood InspIRCd Me  )  [inline]
 

Definition at line 213 of file m_nickflood.cpp.

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

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

Definition at line 270 of file m_nickflood.cpp.

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


Member Function Documentation

virtual Version ModuleNickFlood::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 276 of file m_nickflood.cpp.

References API_VERSION, VF_COMMON, and VF_VENDOR.

void ModuleNickFlood::OnChannelDelete Channel chan  )  [inline, virtual]
 

Called whenever a channel is deleted, either by QUIT, KICK or PART.

Parameters:
chan The channel being deleted

Reimplemented from Module.

Definition at line 259 of file m_nickflood.cpp.

References Extensible::GetExt(), and Extensible::Shrink().

virtual int ModuleNickFlood::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 224 of file m_nickflood.cpp.

References nickfloodsettings::addnick(), CHANOPS_EXEMPT, User::chans, nickfloodsettings::clear(), Extensible::GetExt(), Channel::GetStatus(), nickfloodsettings::islocked(), nickfloodsettings::lock(), Channel::name, User::nick, nickfloodsettings::nicks, nickfloodsettings::secs, Module::ServerInstance, nickfloodsettings::shouldlock(), STATUS_OP, Channel::WriteChannelWithServ(), and User::WriteNumeric().


Member Data Documentation

NickFlood* ModuleNickFlood::jf [private]
 

Definition at line 209 of file m_nickflood.cpp.

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


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