UsersInfos Class Reference

Follow users modes on channels. More...

#include <usersinfos.h>

Inheritance diagram for UsersInfos:

Plugin

List of all members.

Public Member Functions

 UsersInfos (BotKernel *)
 Constructor.
 ~UsersInfos ()
 Destructor.
void addPrefixe (char, char)
 Add a prefixe translation.
char getPrefixe (char)
 Get a prefixe translation.
string getPrefixes ()
 Get all prefixes.
map< string, Channel * > * getUsers ()
 Return the users attribute pointer.
bool hasMode (string, string, char)
 tell if a user has the given mode on a given channel
vector< string > * getLastQuitChannels ()
 Get channels where the last user who quitted was present.

Private Attributes

vector< string > prefixes
 Vector for prefixes translation (@=>o,+=>v).
map< string, Channel * > users
 Channels storage.
vector< string > lastQuitChannels
 Stores channels where the last user who quitted was present.


Detailed Description

Follow users modes on channels.

This plugin gives functions to follow users modes on channels and keep informations (nick,ident,host,status) Can be usefull for operator commands and ban masks

Definition at line 45 of file usersinfos.h.


Constructor & Destructor Documentation

UsersInfos::UsersInfos ( BotKernel b  ) 

UsersInfos::~UsersInfos (  ) 

Destructor.

Destructor

Definition at line 56 of file usersinfos.cpp.

References users.


Member Function Documentation

void UsersInfos::addPrefixe ( char  mode,
char  prefixe 
)

Add a prefixe translation.

Add a prefixe translation for a mode Examples : @ for o % for h + for v

Parameters:
mode Mode for witch you give a prefixe
prefixe Prefixe corresponding to the given mode

Definition at line 73 of file usersinfos.cpp.

References prefixes.

Referenced by event005().

vector< string > * UsersInfos::getLastQuitChannels (  ) 

Get channels where the last user who quitted was present.

Get channels where the last user who quitted was present return Channels where the last user who quitted was present

Definition at line 143 of file usersinfos.cpp.

References lastQuitChannels.

Referenced by onQuit(), and quitHandler().

char UsersInfos::getPrefixe ( char  mode  ) 

Get a prefixe translation.

Get a prefix correspondig to a mode Examples : @ for o % for h + for v

Parameters:
mode Mode for witch you want the prefix
Returns:
Prefix corresponding to the given mode

Definition at line 90 of file usersinfos.cpp.

References prefixes.

Referenced by mode().

string UsersInfos::getPrefixes (  ) 

Get all prefixes.

Get all prefixes

Returns:
all prefixes in a string

Definition at line 107 of file usersinfos.cpp.

References prefixes.

Referenced by modeHandlerProtect().

map< string, Channel * > * UsersInfos::getUsers (  ) 

Return the users attribute pointer.

Gives A pointer to the users's kernel attribute

Returns:
A pointer to the users's storage attribute

Definition at line 152 of file usersinfos.cpp.

References users.

Referenced by ban(), LogFactory::cleanLogs(), clearOutBans(), Moderation::getChanUsersList(), LogFactory::getLoggedChannels(), kickHandler(), lamoule(), modeHandler(), partHandler(), quitHandler(), topicHandler(), and topicJoin().

bool UsersInfos::hasMode ( string  channel,
string  nick,
char  mode 
)

tell if a user has the given mode on a given channel

Tell if a user has the given mode on a given channel

Parameters:
mode Mode to test for the user
channel Channel to check
nick Nick to check
Returns:
True if the user has the mode, else false

Definition at line 123 of file usersinfos.cpp.

References users.

Referenced by Moderation::checkMode(), and Moderation::hasOpPrivileges().


Member Data Documentation

vector<string> UsersInfos::lastQuitChannels [private]

Stores channels where the last user who quitted was present.

Definition at line 53 of file usersinfos.h.

Referenced by getLastQuitChannels(), and UsersInfos().

vector<string> UsersInfos::prefixes [private]

Vector for prefixes translation (@=>o,+=>v).

Definition at line 49 of file usersinfos.h.

Referenced by addPrefixe(), getPrefixe(), and getPrefixes().

map<string,Channel*> UsersInfos::users [private]

Channels storage.

Definition at line 51 of file usersinfos.h.

Referenced by getUsers(), hasMode(), and ~UsersInfos().


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

Generated on Sun Aug 16 15:29:03 2009 for trustyRC by  doxygen 1.5.8