Bashbot

Bashbot was originally an idea and bash snippet from Jonathan Hitchcock. I took it and bastardised it beyond imagination.

It’s a fully-featured, modular IRC bot.

The modules come in 2 types:

  • Commands are matched by filename. I.e. “bot: foo bar” will run the command foo if it exists.
  • Regex commands are matched by a regex in the file’s first line (commented). So a regex-command beginning with # ^(.*) is( also)? (.*)$ will be executed if you try and set a factoid with “bot: Spinach is a vegtable”

Included modules:

  • announce
  • builtin
  • chanops
  • factoid
  • google
  • insult
  • karma
  • logs
  • say
  • tell

Security

This bot is a security nightmare. I haven’t found any mistakes, but you’d be insane to run this in anything but the most strictly-controlled environment.

Performance

No optimisation included :-)

AttachmentSize
bashbot.tar.gz6 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

bashbot

how do you use and play with the bot? i downloaded it what after it? u need to open cod with it?

playing with bashbot

Extract the tarball in your (or preferably a separate user’s) home directory:

  • bin/bashbot contains the configuration and is also the binary you run to make it work
    • BOTNAME: The nick of your bot, something to address it by (it also answers to “bot” and “bashbot”)
    • BOTOWNERS: The nicks of users who can perform administerative tasks
    • SERVER: Address of IRC server
    • PORT: Port on IRC server
    • ONLOGIN: Generally a command to join a room
    • IRCLOG: Where bashbot stores its log
    • BOTDIR: Where bashbot plugins etc. are kept
    • PIPE: Where bashbot keeps its internal communication fifo
  • .bashbot/ contains the modules, logs, etc.
    • commands: These bash snippets are called by saying “bot: ” (generally symlinks into modules)
    • factoids: Storage for factoids for the factoids module
    • messages: Storage for memos
    • modules: Where modules are kept
    • regexes: These bash snippets are called when the in “bot: is matched by a regex in the first line of the snippet (generally symlinks into modules)

Pretty, eh?

I Dont understand. Where do

I Dont understand. Where do i tell what? What means Linkstuff? Plz tell me!

re: I Dont understand. Where do

It sounds like you aren’t familiar with symbolic links. If you aren’t comfortable with *nix and bash, this bot isn’t for you.

It’s not designed to be easy to use - it’s more a demonstration that you can use the wrong language for the job and still survive :-)

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.