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

ModuleAuditorium Class Reference

Inheritance diagram for ModuleAuditorium:

Inheritance graph
[legend]
Collaboration diagram for ModuleAuditorium:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ModuleAuditorium (InspIRCd *Me)
virtual ~ModuleAuditorium ()
virtual void OnRehash (User *user, const std::string &parameter)
 Called on rehash.
virtual Version GetVersion ()
 Returns the version number of a Module.
virtual void OnNamesListItem (User *issuer, User *user, Channel *channel, std::string &prefixes, std::string &nick)
 Called for every item in a NAMES list, so that modules may reformat portions of it as they see fit.
virtual void OnUserJoin (User *user, Channel *channel, bool sync, bool &silent)
 Called when a user joins a channel.
void OnUserPart (User *user, Channel *channel, std::string &partmessage, bool &silent)
 Called when a user parts a channel.
void OnUserKick (User *source, User *user, Channel *chan, const std::string &reason, bool &silent)
 Called whenever a user is kicked.
bool OnHostCycle (User *user)
 Called for every time the user's host or ident changes, to indicate wether or not the 'Changing host' message should be sent, if enabled.
void OnUserQuit (User *user, const std::string &reason, const std::string &oper_message)
 Called when a user quits.

Private Attributes

AuditoriumModeaum
bool ShowOps
bool OperOverride
CUList nl
CUList except_list

Detailed Description

Definition at line 45 of file m_auditorium.cpp.


Constructor & Destructor Documentation

ModuleAuditorium::ModuleAuditorium InspIRCd Me  )  [inline]
 

Definition at line 54 of file m_auditorium.cpp.

References ModeParser::AddMode(), ModuleManager::Attach(), aum, I_OnHostCycle, I_OnNamesListItem, I_OnRehash, I_OnUserJoin, I_OnUserKick, I_OnUserPart, I_OnUserQuit, InspIRCd::Modes, InspIRCd::Modules, OnRehash(), and Module::ServerInstance.

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

Definition at line 71 of file m_auditorium.cpp.

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


Member Function Documentation

virtual Version ModuleAuditorium::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 84 of file m_auditorium.cpp.

References API_VERSION, VF_COMMON, and VF_VENDOR.

bool ModuleAuditorium::OnHostCycle User user  )  [inline, virtual]
 

Called for every time the user's host or ident changes, to indicate wether or not the 'Changing host' message should be sent, if enabled.

Certain modules such as auditorium may opt to hide this message even if it is enabled.

Reimplemented from Module.

Definition at line 160 of file m_auditorium.cpp.

References User::chans.

virtual void ModuleAuditorium::OnNamesListItem User issuer,
User user,
Channel channel,
std::string prefixes,
std::string nick
[inline, virtual]
 

Called for every item in a NAMES list, so that modules may reformat portions of it as they see fit.

For example NAMESX, channel mode +u and +I, and UHNAMES. If the nick is set to an empty string by any module, then this will cause the nickname not to be displayed at all.

Reimplemented from Module.

Definition at line 89 of file m_auditorium.cpp.

References Channel::GetStatus(), User::HasPrivPermission(), Channel::IsModeSet(), OperOverride, ShowOps, and STATUS_OP.

virtual void ModuleAuditorium::OnRehash User user,
const std::string parameter
[inline, virtual]
 

Called on rehash.

This method is called prior to a /REHASH or when a SIGHUP is received from the operating system. You should use it to reload any files so that your module keeps in step with the rest of the application. If a parameter is given, the core has done nothing. The module receiving the event can decide if this parameter has any relevence to it.

Parameters:
user The user performing the rehash, if any -- if this is server initiated, the value of this variable will be NULL.
parameter The (optional) parameter given to REHASH from the user.

Reimplemented from Module.

Definition at line 77 of file m_auditorium.cpp.

References conf, OperOverride, ConfigReader::ReadFlag(), Module::ServerInstance, and ShowOps.

Referenced by ModuleAuditorium().

virtual void ModuleAuditorium::OnUserJoin User user,
Channel channel,
bool  sync,
bool &  silent
[inline, virtual]
 

Called when a user joins a channel.

The details of the joining user are available to you in the parameter User *user, and the details of the channel they have joined is available in the variable Channel *channel

Parameters:
user The user who is joining
channel The channel being joined
silent Change this to true if you want to conceal the JOIN command from the other users of the channel (useful for modules such as auditorium)
sync This is set to true if the JOIN is the result of a network sync and the remote user is being introduced to a channel due to the network sync.

Reimplemented from Module.

Definition at line 117 of file m_auditorium.cpp.

References except_list, Channel::GetStatus(), Channel::IsModeSet(), Channel::name, ShowOps, STATUS_OP, Channel::WriteAllExcept(), and User::WriteFrom().

void ModuleAuditorium::OnUserKick User source,
User user,
Channel chan,
const std::string reason,
bool &  silent
[inline, virtual]
 

Called whenever a user is kicked.

If this method is called, the kick is already underway and cannot be prevented, so to prevent a kick, please use Module::OnUserPreKick instead of this method.

Parameters:
source The user issuing the kick
user The user being kicked
chan The channel the user is being kicked from
reason The kick reason
silent Change this to true if you want to conceal the PART command from the other users of the channel (useful for modules such as auditorium)

Reimplemented from Module.

Definition at line 146 of file m_auditorium.cpp.

References except_list, Channel::GetStatus(), Channel::IsModeSet(), Channel::name, User::nick, ShowOps, STATUS_OP, Channel::WriteAllExcept(), and User::WriteFrom().

void ModuleAuditorium::OnUserPart User user,
Channel channel,
std::string partmessage,
bool &  silent
[inline, virtual]
 

Called when a user parts a channel.

The details of the leaving user are available to you in the parameter User *user, and the details of the channel they have left is available in the variable Channel *channel

Parameters:
user The user who is parting
channel The channel being parted
partmessage The part message, or an empty string (may be modified)
silent Change this to true if you want to conceal the PART command from the other users of the channel (useful for modules such as auditorium)

Reimplemented from Module.

Definition at line 129 of file m_auditorium.cpp.

References except_list, Channel::GetStatus(), Channel::IsModeSet(), Channel::name, ShowOps, STATUS_OP, Channel::WriteAllExcept(), and User::WriteFrom().

void ModuleAuditorium::OnUserQuit User user,
const std::string reason,
const std::string oper_message
[inline, virtual]
 

Called when a user quits.

The details of the exiting user are available to you in the parameter User *user This event is only called when the user is fully registered when they quit. To catch raw disconnections, use the OnUserDisconnect method.

Parameters:
user The user who is quitting
message The user's quit message (as seen by non-opers)
oper_message The user's quit message (as seen by opers)

Reimplemented from Module.

Definition at line 169 of file m_auditorium.cpp.

References User::chans, CommandParser::GetHandler(), Command::Handle(), InspIRCd::Parser, and Module::ServerInstance.


Member Data Documentation

AuditoriumMode* ModuleAuditorium::aum [private]
 

Definition at line 48 of file m_auditorium.cpp.

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

CUList ModuleAuditorium::except_list [private]
 

Definition at line 52 of file m_auditorium.cpp.

Referenced by OnUserJoin(), OnUserKick(), and OnUserPart().

CUList ModuleAuditorium::nl [private]
 

Definition at line 51 of file m_auditorium.cpp.

bool ModuleAuditorium::OperOverride [private]
 

Definition at line 50 of file m_auditorium.cpp.

Referenced by OnNamesListItem(), and OnRehash().

bool ModuleAuditorium::ShowOps [private]
 

Definition at line 49 of file m_auditorium.cpp.

Referenced by OnNamesListItem(), OnRehash(), OnUserJoin(), OnUserKick(), and OnUserPart().


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