|
PandoraBotIRC
1.0.0
An irc bot that acts as a Pandora chatter bot
|
Class representing a Pandora IRC bot. More...
#include <PandoraIRCBot.hpp>
Public Member Functions | |
| PandoraIRCBot () | |
| Default constructor. More... | |
| virtual | ~PandoraIRCBot ()=default |
| Default destructor. More... | |
| PandoraIRCBot (std::string const &server, std::uint16_t const &port, std::string const &nick, std::string const &chan) | |
| Value initialized constructor. More... | |
| PandoraIRCBot (PandoraIRCBot const &)=delete | |
| Copy constructor deleted. More... | |
| PandoraIRCBot & | operator= (PandoraIRCBot const &) |
| Copy assignment disabled. More... | |
| bool | connect () override |
| Responsible for connecting to the irc server. More... | |
| void | disconnect () override |
| Responsible for disconnecting from the irc server. More... | |
| int | run () override |
| Main worker function. Responsible for doing everything the bot needs to do. More... | |
| void | setServer (std::string const &server) |
| sets server More... | |
| void | setNick (std::string const &nick) |
| sets nick More... | |
| void | setPort (std::uint16_t const &port) |
| sets port More... | |
| void | setChannel (std::string const &chan) |
| sets channel More... | |
| std::string | getServer () const |
| Gets server. More... | |
| std::string | getNick () const |
| Gets nick. More... | |
| std::uint16_t | getPort () const |
| Gets port. More... | |
| std::string | getChannel () const |
| Gets channel. More... | |
| void | onPRIVMSG (IRCMessage const &msg) |
| this callback handles PRIVMSG commands sent from the server More... | |
| void | onPING (IRCMessage const &msg) |
| this callback handles PING commands sent from the server More... | |
| void | onPART (IRCMessage const &msg) |
| this callback handles PART commands. More... | |
| void | onALL (IRCMessage const &msg) |
| ALL callback. All messages go through this function. More... | |
Public Member Functions inherited from pbirc::irc::IRCBot | |
| IRCBot ()=default | |
| Default constructor. More... | |
| virtual | ~IRCBot ()=default |
| Virtual default destructor. More... | |
Class representing a Pandora IRC bot.
his bot will connect to an IRC server and respond to users as a Pandora chatterbot.
Refer to the following snippet from main.cpp:
|
inline |
Default constructor.
|
virtualdefault |
Default destructor.
| pbirc::irc::PandoraIRCBot::PandoraIRCBot | ( | std::string const & | server, |
| std::uint16_t const & | port, | ||
| std::string const & | nick, | ||
| std::string const & | chan | ||
| ) |
Value initialized constructor.
| [in] | server | the irc server to connect to |
| [in] | port | the port on the irc server to connect to |
| [in] | nick | the nick the bot should use on the irc server. |
| [in] | chan | the channel the bot should connect to |
|
delete |
Copy constructor deleted.
|
overridevirtual |
Responsible for connecting to the irc server.
Implements pbirc::irc::IRCBot.
|
overridevirtual |
Responsible for disconnecting from the irc server.
Implements pbirc::irc::IRCBot.
|
inline |
Gets channel.
|
inline |
Gets nick.
|
inline |
Gets port.
|
inline |
Gets server.
| void pbirc::irc::PandoraIRCBot::onALL | ( | IRCMessage const & | msg | ) |
ALL callback. All messages go through this function.
Currently outputs them in the terminal.
| void pbirc::irc::PandoraIRCBot::onPART | ( | IRCMessage const & | msg | ) |
this callback handles PART commands.
Says something vulgar about a user after he leaves.
| void pbirc::irc::PandoraIRCBot::onPING | ( | IRCMessage const & | msg | ) |
this callback handles PING commands sent from the server
Responds with PONG
| void pbirc::irc::PandoraIRCBot::onPRIVMSG | ( | IRCMessage const & | msg | ) |
this callback handles PRIVMSG commands sent from the server
Responds with PandoraBot response
| PandoraIRCBot& pbirc::irc::PandoraIRCBot::operator= | ( | PandoraIRCBot const & | ) |
Copy assignment disabled.
|
overridevirtual |
Main worker function. Responsible for doing everything the bot needs to do.
Implements pbirc::irc::IRCBot.
|
inline |
sets channel
|
inline |
sets nick
|
inline |
sets port
|
inline |
sets server