#include <usersinfos.h>
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. |
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.
UsersInfos::UsersInfos | ( | BotKernel * | b | ) |
Constructor.
Constructor
Definition at line 34 of file usersinfos.cpp.
References Plugin::author, Plugin::bindFunction(), Plugin::description, IN_LOOP, IN_TYPE_HANDLER, lastQuitChannels, Plugin::name, and Plugin::version.
UsersInfos::~UsersInfos | ( | ) |
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
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
mode | Mode for witch you want the prefix |
Definition at line 90 of file usersinfos.cpp.
References prefixes.
Referenced by mode().
string UsersInfos::getPrefixes | ( | ) |
Get all prefixes.
Get all prefixes
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
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
mode | Mode to test for the user | |
channel | Channel to check | |
nick | Nick to check |
Definition at line 123 of file usersinfos.cpp.
References users.
Referenced by Moderation::checkMode(), and Moderation::hasOpPrivileges().
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().