Coder Social home page Coder Social logo

bfb's Introduction

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:

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

bfb's People

Contributors

borisfaure avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.