1. sadasant
  2. doppel

Overview

HTTPS SSH

DOPPEL v0.0.15

Doppel is an IRC bot made to automatize simple replies and to send messages to a given email.

The idea is to run it on an ever-running computer, like an Amazon instance, with your nick in the configuration, that way, when you get offline, it will join your configured channels and listen to any mention or private message, which will be sent to your email.

Build and run

You'll need golang, then you'll be able to do

go build

And finally you can run it with:

dopple my_config.json

Config

The config is where you'll define your custom behavior. Please check out the example_config.json and make a copy with your changes.

The config fields are:

  • SMTP: The SMTP fields from your email provider, or your server.
  • mail_to: Which email address will receive the emails.
  • nick_match: (string) Which is the regex you'll use to match for your nickname. The bot will get out of any channel which has a user which nicks matche this field.
  • template_path: Location of the email template (see email.html).
  • email_minutes: Number of minutes to wait before sending the next email. It won't send any mail if no mention or private message was received during this time.
  • nick: Your nick. The bot won't join any channel if this nick is online. When you become offline, the bot will enter the channels.
  • password: Your password.
  • channels: a list of channels (strings) to enter only if your user is not online. If a user which matches with nick_match joins any of these channels, the bot will get out of it until that user logs off.
  • server: the IRC server address, port and a boolean value if you want it to work with ssl.
  • responses: A map of users with a map of responses. Each field of the map is the user's nickname for which each map of responses will apply. If you put an asterisk symbol as the nickname, it will apply to any user. Each nickname field has a map of responses, which has keys and values, the keys will be converted to regexes, if the evaluation of those matches with the received message, the value will be sent back in response.
  • timeout_message: The message to send after timeout_seconds of any response. If you left it empty, no message will be sent.
  • timeout_seconds: The time after the timeout_message will be sent.

TODOS

  • Array configs, so users can have multiple configs, therefore multiple bots.
  • SSL Verify?
  • Better docs.

License

Copyright (c) 2013 Daniel Rodríguez

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.