Twatbot reborn. Posts things from IRC to twitter and reddit. Has other features too.
You'll need the following:
A running mysql instance with a user and password:
create user 'mysql_user'@'localhost' identified by 'some_pw'; create table tell( `sender` varchar(32) NOT NULL, `to` varchar(32) NOT NULL, `message` text not null, `time` datetime not null); alter table service_nicks ADD PRIMARY KEY(irc_nick,service); alter table service_nicks ADD constraint nick_service UNIQUE (irc_nick,service); create table service_nicks( irc_nick varchar(32) not null, service varchar(32) not null, service_nick varchar(32) not null);
- Files called:
- admin (be sure to add your nick here)
Run from the command line, the server name is the first argument, the channels are space separated #channels
python Twatbot2.py irc.freenode.net #channel1 #channel2
If you want all the features, you need to make a keys file and give it key value pairs for the services you want to use:
- nickpass (nickserv password)
The first 4 are for twitter and you need to make a new twitter app and use the scripts provided with python-twitter to get your keys.
Usage is typically from IRC and allows you to interact with its functionality with the format
Admin functionality allows ignoring, removing tweets, reloading plugin modules.
To add more plugins, add them to the list in
Twatbot2.py and also in
__init__.py in the plugins directory.
To add functions to your plugin, they must take parameters:
conninformations about the connection that allows you to send messages and access information about channels
datadata about the current message