Dart is a tiny personal IRC bot.
Unlike most bots, the only functionality Dart comes with is the ability to connect to a server. It’s up to you to add commands using simple YAML building blocks (like executing a shell command).
You’ll need the summer gem, which is an ultra-lightweight IRC framework.
To configure Dart, copy config/summer.yml.example to config/summer.yml.
Tell Dart where to connect using
owner will be inserted into the regular expression
/^owner$/i and should match any hostmasks (e.g. “Wheatiesemail@example.com”) Dart should respond to. Remove
owner to have Dart respond to anyone.
commands is a hash of command names and associated actions. You may use YAML’s &anchors and *references to create “aliases” for your commands.
Each action has a
type, and most types of actions have some additional options.
Actions can access arguments passed to commands.
%0 will be substituted with the entire argument string, and
%1, %2, ... are substituted with individual arguments (or an empty string).
shell, term, terminal
command in a subshell.
|command||The shell command to execute|
message as an IRC PRIVMSG.
|message||The message to send|
|to||The message target (optional)|
message as an IRC NOTICE.
|message||The notice to send|
|to||The notice target (optional)|
code using Ruby’s
eval method and prints the result.
|code||Code to execute|
|silent||If set, will not print result (optional)|
|to||Where to send the result (optional)|
Dart disconnects from the server and exits.
Tell Dart to execute a command by addressing him in IRC:
<Wheaties> dart: echo my hovercraft is full of eels <dart> my hovercraft is full of eels