An IRC bot written in BrainFuck++
Switch branches/tags
Nothing to show
Clone or download
billiob correctly handle JOIN
was always expecting a ':' the channel name after the JOIN keyword
Latest commit 440d527 Nov 3, 2013

README.mkd

bfb is an IRC bot written in brainfuck++

How does it work??

All the source code is written in brainfuck++ in .b files in the src/ directory. You can either run it in the Python interpretor or turn it into C code and then compile it.

Requirements

  • A compiler, either gcc and clang are known to work
  • python 2.5 or later (mainly tested with python 2.6)
  • libssl(-dev) if you want bfb to join ssl irc servers

How to run it?

Using the Python Intrepretor

  • Run bfutils/bfpp-interp.py src/bfb.b
  • Enjoy!

Run it fast!

  • Modify the makefile so that it fits your needs. Defining BFPP_SSL enables SSL support.
  • Type make
  • Run bfb
  • Enjoy!

Configuration

Simple configuration

2 files are needed:

  • server: Write in that file the server bfb should connect to. The format is:

      HOST:PORT
    

    If you want to use SSL, use instead: HOST:PORT:ssl

  • channels:

    Write in that file all the channels bfb should join. The format is one channel per line.

A third file called pass can be used to set a server password used by bfb. The password is written directly in the file (ended or not by a newline). If no PASS command should be sent, a pass file should be created and the rights Read and Write should be removed on that file with chmod -rw pass for example.

I want to customize it!!

Customize JOIN messages

When bfb joins a channel

You should run the helper.py utility to generate for you brainfuck code!! You have to create the file src/msg/join_bfb_hi.b. Let say your message is Hey CHANNELNAME!!!

You have to run:

bfutils/helper.py -m -s'.^' 'Hey ' > src/msg/join_bfb_hi.b

You should only change the last argument. Then you had the code to display the channel name:

[-]
<[<]>
[.^>]

And finally, you add the last part of your message:

bfutils/helper.py -m -s'.^' '!!!' >> src/msg/join_bfb_hi.b

Of course, displaying the channel name is optional and only one call to helper.py is needed.

When someone joins a channel

It works the same way than customizing the msg sent when bfb joins a channel, but this time the file to modify is src/msg/join_welcome.b To put the name of the joiner in the message, use:

[-]
<[<]<<<[<]>>
[.^>]>>>[>]