R E A D M E

OBIRC is a IRC bot you can use to display RSS feeds, makes it possible to program your own module enabling your own commands and contains no copyright or LICENSE, source is here

I N S T A L L

download with pip3 and install globally.

> sudo pip3 install obirc --upgrade

clone the source:

> git clone https://github.com/bthate/obirc
> cd obirc
> sudo python3 setup.py install

or run from tarball:

> tar zxvf obirc-<nr>.tar.gz
> cd obirc-<nr>
> ./bin/obirc irc.freenode.net \#dunkbots obirc2

I R C

for IRC use <server> <channel> <nick> and the bot will connect and join the channel:

> obirc irc.freenode.net \#dunkbots obirc2

you can use the -b option to start the bot in the background and logfiles can be found in ~/.obirc/logs. if you want to have the daemon started at boot, run:

> sudo init.d/install

this will install an obirc service and starts the obirc bot on boot.

R S S

add url:

> obirc -x rss https://news.ycombinator.com/rss
ok 1

you can use the find command to see what urls are registered:

> obirc -x rss
0 https://news.ycombinator.com/rss

U D P

using udp to relay text into a channel, start the bot with -m udp and use the obudp program to send text to the UDP to channel server:

> tail -f ~/.obirc/logs/obirc.log | obudp

U S E R S

the default shell user is root@shell and gives access to all the commands that are available. if you want to use users to control access to commands use the –users option.

> meet bart
~bart@localhost added.

you can also use the full userhost as a argument to meet:

> meet user@server
user user@server created

M O D U L E S

if you want to add your own modules to the bot, you can put your .py files in a “mods” directory and use the -m option to point to that directory.

> obirc -m mods -p

obirc contains the following modules:

obirc      - object bot framework.
obirc.log  - log callback.
obirc.rss  - rss feed to channel.
obirc.show - show runtime information.
obirc.udp  - udp to channel.
obirc.user - user management.

C O D E

basic code is a function that gets an event as a argument:

def command(event):
    << your code here >>

to give feedback to the user use the event.reply(txt) method:

def command(event):
    event.reply("yooo %s" % event.origin)

have fun coding ;]

I N F O

you can contact me on IRC/freenode/#dunkbots.

botfather on #dunkbots irc.freenode.net