#include <botkernel.h>
Public Member Functions | |
BotKernel (string) | |
Constructor. | |
~BotKernel () | |
Destructor. | |
plugin_function | registerFunction (string, Plugin *, func_type, string, plugin_function, time_t, unsigned int) |
Register a function. | |
void | unregisterFunction (plugin_function) |
Unregister a finction. | |
plugin_function | addCountDown (Plugin *, plugin_function, Message *, unsigned int, unsigned int) |
Add a countdown. | |
void | run () |
Launch kernel process. | |
void | stop () |
Stop kernel process. | |
void | send (string) |
Send a message. | |
void | send (vector< string >) |
Send a list (in a vector) of messages. | |
string | getVersion () |
Return the kernel version. | |
string | getDescription () |
Return the kernel description. | |
string | getAuthor () |
Return the kernel author. | |
void | setConnected (bool) |
set the bot connection state | |
bool | getConnected () |
get the bot connection state | |
LogFile * | getSysLog () |
Return the SysLog object pointer. | |
string | getNick () |
get bot's nick | |
void | setNick (string) |
set bot's nick | |
bool | loadPlugin (string, bool) |
Load a plugin. | |
bool | unloadPlugin (string, bool) |
Unload a plugin. | |
pPlugin * | getPlugin (string) |
Send a plugin informations. | |
vector< string > | getPluginsList () |
Send plugin list. | |
time_t | getStartTime () |
Return power on timestamp. | |
time_t | getStartOnline () |
Return connection timestamp. | |
vector< CountDownFunction > * | getCountDowns () |
get a pointer on countdowns | |
ConfigurationFile * | getCONFF () |
Return the configuration file object pointer. | |
string | getDatasDir () |
Return datasdir. | |
Private Member Functions | |
void | displayLicenceHeader () |
Display licence header. | |
void | initDirs () |
Create needed directories. | |
bool | executeFunction (Message *, StructFunctionStorage) |
Execute a plugin function. | |
plugin_function | storeFunction (StructFunctionStorage *) |
Store a plugin function. | |
void | msgTreatment (Message *) |
Treat a received message. | |
void | connect () |
Connect the bot. | |
void | reconnect () |
Reconnect the bot. | |
void | loadPlugins (bool) |
Load all the plugins mentionned in the configuration file. | |
void | unloadMyPlugins (bool) |
Unload all the loaded plugins. | |
bool | pluginLoaded (string) |
Tell if a plugin is loaded (based on the plugin's name). | |
bool | pluginLoaded (void *) |
Tell if a plugin is loaded (based on the plugin's handle). | |
Private Attributes | |
bool | connected |
Bot connection state. | |
string | version |
Bot version. | |
string | description |
Bot description. | |
string | author |
Bot author. | |
list< string > | sendQueue |
Contains messages to send. | |
bool | turn |
True if the bot must process. | |
string | datasDir |
bot's datas directory | |
bool | verbose |
True if received messages must be displayed. | |
time_t | startTime |
Timestamp representing the bot launch time. | |
time_t | startOnline |
Timestamp representing the bot connection time. | |
LogFile * | myLog |
SysLog pointer. | |
ConfigurationFile * | conff |
ConfigurationFile pointer. | |
Socket * | sock |
Socket pointer. | |
vector< StructFunctionStorage > | in_loop_plugins |
"loop" plugins functions storage | |
vector< StructFunctionStorage > | in_free_command_handler_plugins |
"command handler" plugins functions storage | |
vector< StructFunctionStorage > | in_command_handler_plugins |
"free command handler" plugins functions storage | |
vector< StructFunctionStorage > | in_type_handler_plugins |
"type" plugins functions storage | |
vector< StructFunctionStorage > | in_before_treatment_plugins |
"before traitement" plugins functions storage | |
vector< StructFunctionStorage > | in_all_msgs_plugins |
"all messages" plugins functions storage | |
vector< StructFunctionStorage > | in_first_word_plugins |
"First word check" plugins functions storage | |
vector< StructFunctionStorage > | out_all_msgs_plugins |
"all outgoing messages" plugins functions storage | |
vector< pPlugin > | myPlugins |
plugins object en headers | |
vector< CountDownFunction > | countDowns |
Countdowns storage. | |
string | nick |
Bot's nick. | |
AntiExcessFlood | AEX |
Anti excess flood variables. |
This class manages the bot kernel. It can load plugins, and uses all project class
Definition at line 83 of file botkernel.h.
BotKernel::BotKernel | ( | string | confFile | ) |
Constructor.
The class constructor. Initialize private attributes. Parse the configuration file and initialize bot parameters and objects. Then load plugins
confFile | Configuration file path (including name) |
Definition at line 41 of file botkernel.cpp.
References ConfigurationFile::addProtectedKey(), AEX, author, conff, connected, countDowns, datasDir, description, displayLicenceHeader(), ConfigurationFile::getValue(), in_all_msgs_plugins, in_before_treatment_plugins, in_command_handler_plugins, in_free_command_handler_plugins, in_loop_plugins, in_type_handler_plugins, initDirs(), AntiExcessFlood::last_decrease, ConfigurationFile::load(), loadPlugins(), myLog, LogFile::open(), AntiExcessFlood::penality, sendQueue, sock, startTime, turn, verbose, and version.
BotKernel::~BotKernel | ( | ) |
Destructor.
The class destructor Unload plugins, stop threads, and delete objects
Definition at line 89 of file botkernel.cpp.
References conff, INFO, LogFile::log(), myLog, sock, and unloadMyPlugins().
plugin_function BotKernel::addCountDown | ( | Plugin * | p, | |
plugin_function | f, | |||
Message * | m, | |||
unsigned int | count, | |||
unsigned int | timeout | |||
) |
Add a countdown.
Add a count down to the kernel. Functions stored will be executed at the end of their count down A countdown function return false if it must not be deleted after execution (re launch countdown)
p | Plugin's object | |
f | Function to execute | |
m | Message | |
count | countdown | |
timeout | Function timeout |
Definition at line 639 of file botkernel.cpp.
References conff, CountDownFunction::count, COUNTDOWN, countDowns, CountDownFunction::function, StructFunctionStorage::function, Plugin::getHandle(), Message::getMessage(), ConfigurationFile::getValue(), StructFunctionStorage::handle, StructFunctionStorage::highlightedWord, Tools::intToStr(), StructFunctionStorage::lastExec, LogFile::log(), CountDownFunction::msg, myLog, StructFunctionStorage::object, Tools::strToUnsignedInt(), StructFunctionStorage::symbole, StructFunctionStorage::timeout, CountDownFunction::timestamp, StructFunctionStorage::type, and WARNING.
Referenced by addad(), bannedHandler(), Advertising::launchAdvertise(), launchSurvey(), secondaryNick(), and slapme().
void BotKernel::connect | ( | ) | [private] |
Connect the bot.
Connect the bot to the IRC server. Connection parameters are picked in the configuration file.
Definition at line 102 of file botkernel.cpp.
References conff, Socket::connectSock(), ERROR, ConfigurationFile::getValue(), IRCProtocol::identify(), INFO, LogFile::log(), myLog, send(), setConnected(), setNick(), sock, startOnline, Tools::strToInt(), and turn.
Referenced by reconnect(), and run().
void BotKernel::displayLicenceHeader | ( | ) | [private] |
Display licence header.
Display licence header
Definition at line 828 of file botkernel.cpp.
References author, and version.
Referenced by BotKernel().
bool BotKernel::executeFunction | ( | Message * | m, | |
StructFunctionStorage | pfs | |||
) | [private] |
Execute a plugin function.
Execute a function, managing the timeout
m | Message pointer | |
pfs | Function storage |
Definition at line 719 of file botkernel.cpp.
References ThreadParams::b, StructFunctionStorage::back, CPPThread::exec(), ThreadParams::function, Message::getNickSender(), CPPThread::join(), LogFile::log(), ThreadParams::msg, myLog, OUT_ALL_MSGS, ThreadParams::sem, send(), IRCProtocol::sendNotice(), StructFunctionStorage::symbole, CPPThread::terminate(), threadFunc(), StructFunctionStorage::timeout, StructFunctionStorage::type, and WARNING.
Referenced by msgTreatment(), run(), and send().
string BotKernel::getAuthor | ( | ) |
Return the kernel author.
Get kernel author
Definition at line 898 of file botkernel.cpp.
References author.
ConfigurationFile * BotKernel::getCONFF | ( | ) |
Return the configuration file object pointer.
Gives A pointer to the ConfigurationFile's kernel objet
Definition at line 889 of file botkernel.cpp.
References conff.
Referenced by addsuperadmin(), addtempsuperadmin(), allowedCommandCheck(), autoop(), autovoice(), ban(), banmask(), bannedHandler(), bzsearch(), checkBug(), danstonchat(), deletekey(), delsuperadmin(), flushconffile(), getconfvalue(), LogFactory::getLoggedChannels(), getMyFirstNick(), LogFactory::hasToBeLogged(), help(), joinHandler(), kickHandler(), lamoule(), launchSurvey(), loadconffile(), modeHandler(), modeHandlerProtect(), onEndOfMOTD(), planet(), player(), prefix(), protectmodes(), protecttopic(), purifyFile(), randomKick(), rejoinChan(), RemoteControl::RemoteControl(), secondaryNick(), setconfvalue(), setlogkeepfiles(), setloglevel(), setlogperiod(), setNick(), setSuperAdminPass(), testMsgTimestamp(), top5(), topicHandler(), toptotal(), unautoop(), unautovoice(), unprotectmodes(), unprotecttopic(), vote(), and wiki().
bool BotKernel::getConnected | ( | ) |
get the bot connection state
get the bot connexion state
Definition at line 953 of file botkernel.cpp.
References connected.
vector< CountDownFunction > * BotKernel::getCountDowns | ( | ) |
get a pointer on countdowns
Get a pointer on countdowns
Definition at line 1031 of file botkernel.cpp.
References countDowns.
Referenced by clearCountDowns(), and getnbcountdowns().
string BotKernel::getDatasDir | ( | ) |
Return datasdir.
Get bot's datas directory
Definition at line 1040 of file botkernel.cpp.
References datasDir.
Referenced by Admin::Admin(), Advertising::Advertising(), FedoraProject::FedoraProject(), greplog(), Ignore::Ignore(), Lamoule::Lamoule(), lastseen(), listlibs(), LogFactory::LogFactory(), Moderation::Moderation(), LogFactory::newLog(), Quotes::Quotes(), reloadfas(), run(), and sysinfos().
string BotKernel::getDescription | ( | ) |
Return the kernel description.
Get kernel description
Definition at line 916 of file botkernel.cpp.
References description.
string BotKernel::getNick | ( | ) |
get bot's nick
Gives bot's nick
Definition at line 934 of file botkernel.cpp.
References nick.
Referenced by banmask(), checkConnection(), clearOutBans(), joinHandler(), kick(), kickall(), kickHandler(), masskick(), modeHandler(), modeHandlerProtect(), nick_changed(), nickHandler(), onEndOfMOTD(), onJoin(), onKick(), onPart(), partHandler(), quitHandler(), randomKick(), sendHandler(), topicHandler(), unop(), and unopall().
pPlugin * BotKernel::getPlugin | ( | string | name | ) |
Send a plugin informations.
Return a plugin informations Informations are name, handle, constructor, destructor ... witch name is given by the "name" parameter
name | Plugin name |
Definition at line 975 of file botkernel.cpp.
References myPlugins, and pluginLoaded().
Referenced by addad(), addIgnore(), adinfos(), ban(), Moderation::checkAccess(), Moderation::checkMode(), LogFactory::cleanLogs(), clearOutBans(), delad(), deleteplayer(), delIgnore(), delQuote(), Moderation::getChanUsersList(), LogFactory::getLoggedChannels(), Moderation::hasOpPrivileges(), ignoreList(), increase(), invite(), isIgnored(), joinHandler(), kickHandler(), lamoule(), listads(), listlibs(), listmodules(), load(), loadnocheck(), modeHandler(), modeHandlerProtect(), moduleinfos(), myThread(), nextscore(), partHandler(), protectmodes(), protecttopic(), quitHandler(), quoteInfos(), reauth(), reloadfas(), stopSurvey(), testMsgTimestamp(), topicHandler(), topicJoin(), unload(), unloadnocheck(), unprotectmodes(), and unprotecttopic().
vector< string > BotKernel::getPluginsList | ( | ) |
Send plugin list.
Return the plugins list
Definition at line 999 of file botkernel.cpp.
References myPlugins.
Referenced by listmodules().
time_t BotKernel::getStartOnline | ( | ) |
Return connection timestamp.
Return connection timestamp
Definition at line 1022 of file botkernel.cpp.
References startOnline.
Referenced by online().
time_t BotKernel::getStartTime | ( | ) |
Return power on timestamp.
Return power on timestamp
Definition at line 1013 of file botkernel.cpp.
References startTime.
Referenced by uptime().
LogFile * BotKernel::getSysLog | ( | ) |
Return the SysLog object pointer.
Gives A pointer to the LogFile's kernel objet
Definition at line 925 of file botkernel.cpp.
References myLog.
Referenced by addIgnore(), addOnlyon(), addsuperadmin(), addtempsuperadmin(), bannedHandler(), checkConnection(), clearCountDowns(), deletekey(), delIgnore(), delOnlyon(), delsuperadmin(), disable(), disconnect(), enable(), error(), FedoraProject::FedoraProject(), flushconffile(), joinChannel(), kickall(), kickHandler(), leaveChannel(), load(), loadconffile(), loadnocheck(), LogFactory::LogFactory(), masskick(), onEndOfMOTD(), onInvite(), opall(), randomKick(), rejoinChan(), reloadfas(), reset(), secondaryNick(), setconfvalue(), setlogkeepfiles(), setloglevel(), setlogperiod(), setNick(), setSuperAdminPass(), RemoteControl::tcpServer(), unload(), unloadnocheck(), unopall(), unvoiceall(), and voiceall().
string BotKernel::getVersion | ( | ) |
Return the kernel version.
Get kernel version
Definition at line 907 of file botkernel.cpp.
References version.
Referenced by ctcp_version(), and version().
void BotKernel::initDirs | ( | ) | [private] |
Create needed directories.
Create needed directories
Definition at line 839 of file botkernel.cpp.
References conff, datasDir, and ConfigurationFile::getFilePath().
Referenced by BotKernel().
bool BotKernel::loadPlugin | ( | string | fileName, | |
bool | checkDependancy | |||
) |
Load a plugin.
Load a plugin, to make all its functions usable by the bot
fileName | Dynamic librairy containing the plugins. Just the name, not the path | |
checkDependancy | Set this to true to check for plugin requirements |
Definition at line 291 of file botkernel.cpp.
References Plugin::checkMembers(), pPlugin::creator, datasDir, pPlugin::destructor, ERROR, error(), StructFunctionStorage::function, Plugin::getFunctions(), Plugin::getName(), Plugin::getRequirements(), StructFunctionStorage::handle, pPlugin::handle, INFO, LogFile::log(), myLog, myPlugins, pPlugin::name, pPlugin::object, pluginLoaded(), Plugin::setHandle(), storeFunction(), StructFunctionStorage::symbole, and WARNING.
Referenced by load(), loadnocheck(), and loadPlugins().
void BotKernel::loadPlugins | ( | bool | checkDependancy | ) | [private] |
Load all the plugins mentionned in the configuration file.
Load all the plugins mentionned in the configuration file.
checkDependancy | Set this to true to check for plugin requirements |
Definition at line 268 of file botkernel.cpp.
References conff, ConfigurationFile::getValue(), INFO, Tools::intToStr(), loadPlugin(), LogFile::log(), myLog, and Tools::stringToVector().
Referenced by BotKernel().
void BotKernel::msgTreatment | ( | Message * | msg | ) | [private] |
Treat a received message.
Treat a message according to its type. Each type of plugin is tested to watch if the message is concerned
msg | Pointer to the message object |
Definition at line 674 of file botkernel.cpp.
References conff, executeFunction(), Message::getPart(), Message::getSplit(), ConfigurationFile::getValue(), in_all_msgs_plugins, in_command_handler_plugins, in_first_word_plugins, in_free_command_handler_plugins, in_type_handler_plugins, Message::nbParts(), and Tools::to_lower().
Referenced by run().
bool BotKernel::pluginLoaded | ( | void * | handle | ) | [private] |
Tell if a plugin is loaded (based on the plugin's handle).
Check if a plugin is loaded. The result is based on the plugin handle
handle | Plugin handle |
Definition at line 504 of file botkernel.cpp.
References myPlugins.
bool BotKernel::pluginLoaded | ( | string | name | ) | [private] |
Tell if a plugin is loaded (based on the plugin's name).
Check if a plugin is loaded. The result is based on the plugin NAME (object attribute), not on the file name containing the plugin
name | Plugin name |
Definition at line 488 of file botkernel.cpp.
References myPlugins.
Referenced by getPlugin(), loadPlugin(), and registerFunction().
void BotKernel::reconnect | ( | ) | [private] |
Reconnect the bot.
Makes the bot reload the connection All connections objects a re-initialised
Definition at line 122 of file botkernel.cpp.
References Socket::closeSock(), connect(), INFO, LogFile::log(), myLog, setConnected(), and sock.
Referenced by run().
plugin_function BotKernel::registerFunction | ( | string | hlword, | |
Plugin * | object, | |||
func_type | type, | |||
string | symbole, | |||
plugin_function | function, | |||
time_t | lastExec, | |||
unsigned int | timeout | |||
) |
Register a function.
Register a new function. The function is added in the plugins queues and can be triggered
hlword | higlited word | |
object | plugin's object | |
type | function type | |
symbole | symbole to execute | |
function | function to execute | |
lastExec | last exec | |
timeout | fuction timeout |
Definition at line 556 of file botkernel.cpp.
References StructFunctionStorage::function, Plugin::getHandle(), StructFunctionStorage::handle, StructFunctionStorage::highlightedWord, StructFunctionStorage::lastExec, StructFunctionStorage::object, pluginLoaded(), storeFunction(), StructFunctionStorage::symbole, StructFunctionStorage::timeout, and StructFunctionStorage::type.
Referenced by launchSurvey().
void BotKernel::run | ( | ) |
Launch kernel process.
Kernel process Manage objects to receive, send and treat messages
Definition at line 136 of file botkernel.cpp.
References Socket::closeSock(), connect(), connected, countDowns, executeFunction(), getDatasDir(), Socket::getState(), in_before_treatment_plugins, in_loop_plugins, INFO, Tools::intToStr(), LogFile::log(), Tools::log(), msgTreatment(), myLog, Socket::receive(), reconnect(), setConnected(), Message::setMessage(), sock, Tools::stringToVector(), Tools::strToInt(), turn, verbose, and WARNING.
void BotKernel::send | ( | vector< string > | vec | ) |
Send a list (in a vector) of messages.
Send strings to the server
vec | Vector containing strings to send |
Definition at line 818 of file botkernel.cpp.
References send().
void BotKernel::send | ( | string | str | ) |
Send a message.
Send a string to the server
str | String to send |
Definition at line 756 of file botkernel.cpp.
References AEX, conff, executeFunction(), Message::getMessage(), ConfigurationFile::getValue(), AntiExcessFlood::last_decrease, LogFile::log(), myLog, out_all_msgs_plugins, AntiExcessFlood::penality, Socket::sendStr(), setConnected(), Message::setMessage(), sock, and WARNING.
Referenced by addad(), addIgnore(), addOnlyon(), addQuote(), addsuperadmin(), addtempsuperadmin(), adinfos(), autoop(), autovoice(), ball(), ban(), bandel(), baninfos(), banlist(), banmask(), bug(), bzsearch(), chanlev(), checkBug(), checkConnection(), clearCountDowns(), clearOutBans(), commandsStatus(), connect(), ctcp_ping(), ctcp_version(), cycleChannel(), danstonchat(), delad(), deletekey(), deleteplayer(), delIgnore(), delOnlyon(), delQuote(), delsuperadmin(), disable(), disconnect(), displayAdvertise(), displayPaste(), enable(), endSurvey(), executeFunction(), fas(), flushconffile(), getconfvalue(), getMyFirstNick(), getnbcountdowns(), greplog(), help(), hl(), host2ip(), ignoreList(), increase(), invite(), ip2host(), isIgnored(), joinChannel(), joinHandler(), kick(), kickall(), kickHandler(), lamoule(), lastQuote(), lastseen(), launchSurvey(), leaveChannel(), listads(), listlibs(), listmodules(), load(), loadconffile(), loadnocheck(), masskick(), modeHandler(), modeHandlerProtect(), moduleinfos(), myFunction(), nextscore(), notice(), onEndOfMOTD(), onInvite(), onJoin(), online(), op(), opall(), partHandler(), pinged(), planet(), player(), prefix(), protectmodes(), protecttopic(), q3(), quitHandler(), quote(), quoteInfos(), randomKick(), raw(), rejoinChan(), reloadfas(), reloadUsers(), searchQuote(), secondaryNick(), send(), setconfvalue(), setlogkeepfiles(), setloglevel(), setlogperiod(), setNick(), setSuperAdminPass(), slapme(), slapUser(), stopSurvey(), superadminlist(), sysinfos(), tele(), tell(), top5(), topic(), topicHandler(), topshot(), toptotal(), trad(), unautoop(), unautovoice(), unbanall(), unload(), unloadnocheck(), unop(), unopall(), unprotectmodes(), unprotecttopic(), unvoice(), unvoiceall(), uptime(), version(), voice(), voiceall(), vote(), warsow(), whoami(), whoowns(), and wiki().
void BotKernel::setConnected | ( | bool | state | ) |
set the bot connection state
Set the bot connexion state This state is important to make the bot reset if disconnected
state | true for connected, false for disconnected |
Definition at line 963 of file botkernel.cpp.
References connected.
Referenced by checkConnection(), connect(), reconnect(), reset(), run(), and send().
void BotKernel::setNick | ( | string | nick | ) |
set bot's nick
Set bot's nick
nick | new nick |
Definition at line 943 of file botkernel.cpp.
Referenced by connect(), getMyFirstNick(), secondaryNick(), and setNick().
void BotKernel::stop | ( | ) |
Stop kernel process.
Stop the bot
Definition at line 258 of file botkernel.cpp.
References INFO, LogFile::log(), myLog, and turn.
Referenced by disconnect().
plugin_function BotKernel::storeFunction | ( | StructFunctionStorage * | func | ) | [private] |
Store a plugin function.
Store a function and return it's id
func | Function to store |
Definition at line 519 of file botkernel.cpp.
References StructFunctionStorage::function, IN_ALL_MSGS, in_all_msgs_plugins, IN_BEFORE_TREATMENT, in_before_treatment_plugins, IN_COMMAND_HANDLER, in_command_handler_plugins, IN_FIRST_WORD, in_first_word_plugins, IN_FREE_COMMAND_HANDLER, in_free_command_handler_plugins, IN_LOOP, in_loop_plugins, IN_TYPE_HANDLER, in_type_handler_plugins, LogFile::log(), myLog, OUT_ALL_MSGS, out_all_msgs_plugins, StructFunctionStorage::symbole, StructFunctionStorage::type, and WARNING.
Referenced by loadPlugin(), and registerFunction().
void BotKernel::unloadMyPlugins | ( | bool | checkDependancy | ) | [private] |
Unload all the loaded plugins.
Unload all the loaded plugins. Makes the bot run only with the kernel (no functionnalities)
checkDependancy | Set this to true to check for plugin requirements |
Definition at line 473 of file botkernel.cpp.
References myPlugins, and unloadPlugin().
Referenced by ~BotKernel().
bool BotKernel::unloadPlugin | ( | string | name, | |
bool | checkDependancy | |||
) |
Unload a plugin.
Unload a plugin. Functions provided by the plugin can no more be used by the kernel.
name | Plugin name | |
checkDependancy | Set this to true to check for plugin requirements |
Definition at line 382 of file botkernel.cpp.
References ERROR, in_all_msgs_plugins, in_before_treatment_plugins, in_command_handler_plugins, in_first_word_plugins, in_free_command_handler_plugins, in_loop_plugins, in_type_handler_plugins, INFO, LogFile::log(), myLog, myPlugins, and out_all_msgs_plugins.
Referenced by unload(), unloadMyPlugins(), and unloadnocheck().
void BotKernel::unregisterFunction | ( | plugin_function | func | ) |
Unregister a finction.
Unregister a function
func | Function pointer |
Definition at line 577 of file botkernel.cpp.
References countDowns, in_all_msgs_plugins, in_before_treatment_plugins, in_command_handler_plugins, in_first_word_plugins, in_free_command_handler_plugins, in_loop_plugins, in_type_handler_plugins, and out_all_msgs_plugins.
Referenced by endSurvey(), myUselessFunction(), and stopSurvey().
AntiExcessFlood BotKernel::AEX [private] |
Anti excess flood variables.
Definition at line 197 of file botkernel.h.
Referenced by BotKernel(), and send().
string BotKernel::author [private] |
Bot author.
Definition at line 147 of file botkernel.h.
Referenced by BotKernel(), displayLicenceHeader(), and getAuthor().
ConfigurationFile* BotKernel::conff [private] |
ConfigurationFile pointer.
Definition at line 163 of file botkernel.h.
Referenced by addCountDown(), BotKernel(), connect(), getCONFF(), initDirs(), loadPlugins(), msgTreatment(), send(), and ~BotKernel().
bool BotKernel::connected [private] |
Bot connection state.
Definition at line 141 of file botkernel.h.
Referenced by BotKernel(), getConnected(), run(), and setConnected().
vector<CountDownFunction> BotKernel::countDowns [private] |
Countdowns storage.
Definition at line 185 of file botkernel.h.
Referenced by addCountDown(), BotKernel(), getCountDowns(), run(), and unregisterFunction().
string BotKernel::datasDir [private] |
bot's datas directory
Definition at line 153 of file botkernel.h.
Referenced by BotKernel(), getDatasDir(), initDirs(), and loadPlugin().
string BotKernel::description [private] |
Bot description.
Definition at line 145 of file botkernel.h.
Referenced by BotKernel(), and getDescription().
vector<StructFunctionStorage> BotKernel::in_all_msgs_plugins [private] |
"all messages" plugins functions storage
Definition at line 177 of file botkernel.h.
Referenced by BotKernel(), msgTreatment(), storeFunction(), unloadPlugin(), and unregisterFunction().
vector<StructFunctionStorage> BotKernel::in_before_treatment_plugins [private] |
"before traitement" plugins functions storage
Definition at line 175 of file botkernel.h.
Referenced by BotKernel(), run(), storeFunction(), unloadPlugin(), and unregisterFunction().
vector<StructFunctionStorage> BotKernel::in_command_handler_plugins [private] |
"free command handler" plugins functions storage
Definition at line 171 of file botkernel.h.
Referenced by BotKernel(), msgTreatment(), storeFunction(), unloadPlugin(), and unregisterFunction().
vector<StructFunctionStorage> BotKernel::in_first_word_plugins [private] |
"First word check" plugins functions storage
Definition at line 179 of file botkernel.h.
Referenced by msgTreatment(), storeFunction(), unloadPlugin(), and unregisterFunction().
vector<StructFunctionStorage> BotKernel::in_free_command_handler_plugins [private] |
"command handler" plugins functions storage
Definition at line 169 of file botkernel.h.
Referenced by BotKernel(), msgTreatment(), storeFunction(), unloadPlugin(), and unregisterFunction().
vector<StructFunctionStorage> BotKernel::in_loop_plugins [private] |
"loop" plugins functions storage
Definition at line 167 of file botkernel.h.
Referenced by BotKernel(), run(), storeFunction(), unloadPlugin(), and unregisterFunction().
vector<StructFunctionStorage> BotKernel::in_type_handler_plugins [private] |
"type" plugins functions storage
Definition at line 173 of file botkernel.h.
Referenced by BotKernel(), msgTreatment(), storeFunction(), unloadPlugin(), and unregisterFunction().
LogFile* BotKernel::myLog [private] |
SysLog pointer.
Definition at line 161 of file botkernel.h.
Referenced by addCountDown(), BotKernel(), connect(), executeFunction(), getSysLog(), loadPlugin(), loadPlugins(), reconnect(), run(), send(), stop(), storeFunction(), unloadPlugin(), and ~BotKernel().
vector<pPlugin> BotKernel::myPlugins [private] |
plugins object en headers
Definition at line 183 of file botkernel.h.
Referenced by getPlugin(), getPluginsList(), loadPlugin(), pluginLoaded(), unloadMyPlugins(), and unloadPlugin().
string BotKernel::nick [private] |
vector<StructFunctionStorage> BotKernel::out_all_msgs_plugins [private] |
"all outgoing messages" plugins functions storage
Definition at line 181 of file botkernel.h.
Referenced by send(), storeFunction(), unloadPlugin(), and unregisterFunction().
list<string> BotKernel::sendQueue [private] |
Socket* BotKernel::sock [private] |
Socket pointer.
Definition at line 165 of file botkernel.h.
Referenced by BotKernel(), connect(), reconnect(), run(), send(), and ~BotKernel().
time_t BotKernel::startOnline [private] |
Timestamp representing the bot connection time.
Definition at line 159 of file botkernel.h.
Referenced by connect(), and getStartOnline().
time_t BotKernel::startTime [private] |
Timestamp representing the bot launch time.
Definition at line 157 of file botkernel.h.
Referenced by BotKernel(), and getStartTime().
bool BotKernel::turn [private] |
True if the bot must process.
Definition at line 151 of file botkernel.h.
Referenced by BotKernel(), connect(), run(), and stop().
bool BotKernel::verbose [private] |
True if received messages must be displayed.
Definition at line 155 of file botkernel.h.
Referenced by BotKernel(), and run().
string BotKernel::version [private] |
Bot version.
Definition at line 143 of file botkernel.h.
Referenced by BotKernel(), displayLicenceHeader(), and getVersion().