Sep93 IRC client/bot

Download the latest code (last modified: 2018-11-24 21:27)

You can get help, or report any problems on our IRC channel #sep93 on irc.armchairscientist.co.uk

Getting started

  1. Copy the example IRC config file and edit it to point to your IRC server
    cp conf/config_irc.example.php conf/config_irc.php
  2. That's it. Now you can just run ircbot.php to connect
    php ircbot.php

  3. If you want more of the features that are available (editable ruleset, message queues etc), then the bot requires a mysql database. You can build the basic database using the included SQL file (includes/sep93.sql)
    mysql -u root databasename < sep93.sql
    and then set the database access details
    cp conf/config_db.example.php conf/config_db.php

irc-cat.php

This program allows data to be passed directly to the bot's send queue via local sockets. The port and default send channel can be set as parameters to the program, e.g.

php irc-cat.php 8000 "#testchannel"

Data can then be copied directly to the port, e.g.

echo "Test message" > /dev/tcp/localhost/8000
or piped via netcat, .e.g.
echo "Test message" | nc -q0 localhost 8000

Messages can be sent to multiple channels or to specific usernames by prefixing the message with a comma seperated list of channels/usernames e.g.

echo "#channel1,@username,#channel2 Test message" | nc -q0 localhost 8000

http-cat.php

Similar to irc-cat, but accepts HTTP post requests and passes them to the bot's message queue. It should be placed on an HTTP server, and will read a key/passphrase from conf/config_httpcat.php. An example of a form used to post to it:

<form method="post" action="https://url-of-http-cat.php">
<input type="password" value="password from config_httpcat.php" />
<input type="text" value="message goes here" />
<input type="submit" value="Post" />
</form>

Troubleshooting