TIRCD(1) | User Contributed Perl Documentation | TIRCD(1) |
tircd - An ircd proxy to the twitter API
tircd presents twitter as an irc channel. You can connect to tircd with any irc client, and twitter as if you were on irc
tircd requires a recent version of perl, and the following modules:
POE
POE::Filter::IRCD
Net::Twitter::Lite::WithAPIv1_1
JSON::Any
Time::Local
File::Glob
IO::File
LWP::UserAgent
Storable
URI
List::Util
HTML::Entities
Digest::SHA1
If you're using a redhat or debian based system, attempt to use the distrobutions CPAN module packages, in yum or apt.
To install all modules via CPAN:
cpan -i POE POE::Filter::IRCD Net::Twitter::Lite JSON::Any Time::Local File::Glob IO::File LWP::UserAgent Storable URI List::Util HTML::Entities Digest::SHA1
When started, tircd will look for a configuration file in the following places:
tircd.cfg (in the current directory)
~/.tircd
/etc/tircd.cfg
You can specify an alternate path to the configuration file on the commandline if you want to keep the configuration in another location. There is an example config provided as part of the distribution. The easiest way to get started is to just rename that file from tircd.cfg.example to tircd.cfg
By default, tircd listens on localhost port 6667.
The first time you connect with a new twitter account you must specify a tircd password for that nick. This password does not have to (and should not) be the same as your twitter password. This password will protect your tircd account from unauthorized usage.
The above password is to protect your tircd account, and is not related to your twitter account. The tircd nick password will only be saved once you have logged into Twitter
With many irc clients you can do this by issuing the command /SERVER localhost 6667 <tircd password> <twitter username>. Check your client's documentation for the appropirate syntax.
Tircd will make an OAuth challenege to Twitter, and Twitter will return a link to a page where you can authorize the connection. This link will appear in your IRC connection status window.
Make sure you are either logged into twitter as the account you plan to use, or not logged in. Click the authorize link and log-in, then click "Allow". Twitter will then present you with a PIN number. To complete your connection to tircd, type: /stats pin <PIN NUMBER>. On some clients you may have to type: /quote stats pin <PIN NUMBER>.
If the PIN is accepted by Twitter, the connection will be established. You may now join #twitter to begin. If the PIN is not accepted, another authorization link will be generated.
Tircd supports password protection in the following way.
There is currently no way of regaining access to your account if you forget it. To reset your tircd password, you will have to remove your Username.config and authorize with twitter using OAuth and a PIN again.
Once connected "/JOIN #twitter" to get started. The channel #twitter is where you will perform most opertions
If you want to have all message you send to #twitter posted as tweets, you can set the config option "auto_post" to 1. Either in tircd.conf or via the /stats command. Messages beginning with an exclamation point ("!") will still be processed as commands, not tweeted.
@replies are also sent to the channel as messages.
!retweet a7f
!reply 6eb @tircdbot not today!
!favorite a44
To send a direct message, simply send a private message to the user you want to dm.
Issuing a /WHOIS on your own user name will also provide the number of API calls that have been used in the last hour.
!invite is the analogous offerbot command.
!kick is the analogous offerbot command.
These options are saved in a file with the name Username.config (where Username is your twitter username) located in a directory set in the global config file (default: /tmp/tricd)
![update|up|refresh] - Updates the #twitter stream immediately.
![tweet|t] <text of tweet> - Posts the given text as an update to your feed.
![retweet|rt] <tweed-id> - Posts a retweet. tweet-id is the 3 digit code preceding the tweet.
![reply|re] <tweet-id <message text>> - Replies to a tweet. tweet-id is a the 3 digit code preceding the tweet.
![conversation|conv] <tweet-id> - Replay a conversation from beginning. If tweet is not a reply, shows related tweets.
![add|invite|follow] <username> - Begin following the specified twitter username.
![remove|kick|unfollow] <username> - Remove the username from the list of people your account follows.
!save - Saves twitter-username specific configuration immediately.
!help - Shows this help message.
Tim Sogard <tircd@timsogard.com> [2010-2011]
Ola Thoresen <olen@inni.no> [2010-2011]
Chris Nelson <cnelson@crazybrain.org> [2009]
This module may be used, modified, and distributed under the same terms as Perl itself. Please see the license that came with your Perl distribution for details.
POE
POE::Filter::IRCD
Net::Twitter::Lite
JSON::Any
Time::Local
File::Glob
IO::File
LWP::UserAgent
Storable
URI
List::Util
HTML::Entities
Digest::SHA1
2017-11-18 | perl v5.26.1 |