This is an IRC Bot written in C++ aimed at being useful and easily extendable for the #ukhasnet irc channel on freenode.
It is requested that you contact the author of the code if you find the code useful.
This is the parent namespace for all classes used in this code.
Reads in the configuration from config.json (see template for current format).
Future extensions will all the config to be modified whilst running and save that config back out.
Thread started from the main processes. Each process also connects to the Handler to pass it messages Handler() should only be called once and can be used to start the thread. Handler(irc::connection*) should be called by each connection thread to send messages to the handler
Planned commands PRIVMSG/NOTICE are all logged (!h will add a hidden flag on the DB version Also log other things (JOIN/PART/NICK/QUIT/MODE) ?
!seen When was a nickname last seen !node Provides info about a node !follow
Ideally in Future it should be possible to add the actual handlers to this class programatically
Handles logging to log files.
Not a class as such, but the main process for the bot.
This namespace handles all the IRC specific parts
Handles connection to server Creates a thread per server to handle communications
Used to store mesasges to and from the server
Used to store details about a server
Will be used in the irc::Server class to store channel information (this is currently done with strings)
Will be used by the irc::Channel class to store who's in (or has been in) a channel (needed for the !seen function)
Handles connection to DB
Ideally functions will be stored in their own classes allowing for easy extension of the code.
sudo apt-get install g++ sudo apt-get install make sudo apt-get install libjansson-dev sudo apt-get install libpqxx3-dev libpqxx-3.1
Note that this requires at least Jansson 2.3 (Ubuntu 12.04 has Jansson 2.2)