Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
This is the IRC adapter for hubot. For discussion about this adapter, join #hubot-irc
on irc.freenode.net
. For convenience you can #hubot-irc using webchat.freenode.net/
To get your own hubot up and running we recommend following the Getting Started directions from the hubot wiki, they are summarized here:
% npm install -g yo generator-hubot
% mkdir myhubot
% cd myhubot
% yo hubot --adapter=irc
% HUBOT_IRC_SERVER=irc.freenode.net \
HUBOT_IRC_ROOMS="#myhubot-irc" \
HUBOT_IRC_NICK="myhubot" \
HUBOT_IRC_UNFLOOD="true" \
bin/hubot -a irc --name myhubot
Note: The default hubot configuration will use a redis based brain that assumes the redis server is already running. Either start your local redis server (usually with redis-start &
) or remove the redis-brain.coffee
script from the default hubot-scripts.json
file.
The IRC adapter requires only the following environment variables.
HUBOT_IRC_SERVER
HUBOT_IRC_ROOMS
HUBOT_IRC_NICK
And the following are optional.
HUBOT_IRC_PORT
HUBOT_IRC_USERNAME
HUBOT_IRC_PASSWORD
HUBOT_IRC_NICKSERV_PASSWORD
HUBOT_IRC_NICKSERV_USERNAME
HUBOT_IRC_SERVER_FAKE_SSL
HUBOT_IRC_SERVER_CERT_EXPIRED
HUBOT_IRC_UNFLOOD
HUBOT_IRC_DEBUG
HUBOT_IRC_USESSL
HUBOT_IRC_PRIVATE
HUBOT_IRC_USESASL
This is the full hostname or IP address of the IRC server you want your hubot to connect to. Make a note of it.
This is a comma separated list of the IRC channels you want your hubot to join.
They must include the #
. Make a note of them. You can join private channels
by simply appending the channel password to the room, e.g. #private password
.
This is the optional nick you want your hubot to join with. If omitted it will default to the name of your hubot.
This is the optional port of the IRC server you want your hubot to connect to.
If omitted the default is 6667
. Make a note of it if required.
This is the optional username and/or password of the IRC server you want your hubot to connect to. If the IRC server doesn't require a username/password, this can be omitted. Make a note of it if required.
This is the optional Nickserv password if your hubot is using a nick registered with Nickserv on the IRC server. Make a note of it if required.
This is the optional Nickserv username if your hubot is using a nick registered
with Nickserv on the IRC server, e.g. /msg NickServ identify <username> <password>
.
This is the optional flag if you want to accept self signed SSL certificated from a non trusted CA. You can set the variable to anything.
This is the optional flag if you want to accept an expired SSL certificate.
This is the optional flag if you want to protect your hubot from flooding channels with messages. It will queue messages and slowly send. You can set the variable to any truthy value or a number; if a number is given we will interpret it as a wait time in milliseconds to use between sending messages.
This is the optional flag which will display debug output. You can set the variable to anything.
This is the optional flag if your hubot is connecting to an IRC server using SSL. You can set the variable to anything.
This is the optional flag if your hubot should ignore PRIVMSG
and INVITE
commands. You can set the variable to anything.
SASL is a method that allows identification to services (NickServ) during the connection process, before anything else happens - therefore eliminating the need to /msg nickserv identify. Note: May be a requirement from some IRC hosts (freenode) when connecting from a public cloud provider (AWS).
% heroku config:add HUBOT_IRC_SERVER="..."
% heroku config:add HUBOT_IRC_ROOMS="#foo,#bar"
Optional
% heroku config:add HUBOT_IRC_NICK="..."
% heroku config:add HUBOT_IRC_PORT=6767
% heroku config:add HUBOT_IRC_USERNAME="..."
% heroku config:add HUBOT_IRC_PASSWORD="..."
% heroku config:add HUBOT_IRC_NICKSERV_PASSWORD="..."
% heroku config:add HUBOT_IRC_SERVER_FAKE_SSL="true"
% heroku config:add HUBOT_IRC_UNFLOOD="true"
% heroku config:add HUBOT_IRC_DEBUG="true"
% heroku config:add HUBOT_IRC_USESSL="true"
% heroku config:add HUBOT_IRC_USESASL="true"
% export HUBOT_IRC_SERVER="..."
% export HUBOT_IRC_ROOMS="#foo,#bar"
Optional
% export HUBOT_IRC_NICK="..."
% export HUBOT_IRC_PORT=6767
% export HUBOT_IRC_USERNAME="..."
% export HUBOT_IRC_PASSWORD="..."
% export HUBOT_IRC_NICKSERV_PASSWORD="..."
% export HUBOT_IRC_SERVER_FAKE_SSL="true"
% export HUBOT_IRC_UNFLOOD="true" # Can optionally be passed a number (in milliseconds) that will be used as the delay between messages
% export HUBOT_IRC_DEBUG="true"
% export HUBOT_IRC_USESSL="true"
% export HUBOT_IRC_USESASL="true"
From Powershell:
setx HUBOT_IRC_SERVER "..." /m
setx HUBOT_IRC_ROOMS "#foo,#bar" /m
gem install foreman
git clone https://github.com/github/hubot.git
cd hubot
# this next line makes a deployable version of the bot for heroku or local deployments
make package
mv hubot/ ../testbot
cd ../testbot
- modify package.json to include the version of hubot-irc to test with either an official release or from your local repo
for an example see this https://gist.github.com/3148311
- modify Procfile, change adapter (-a option) to "irc" and change the name (-n option) of the bot
- make sure you followed the usage section from above to set the environment variables (Non-Heroku section)
foreman start
...and that is it
Here's the most direct way to get your work merged into the project.
Copyright © Hubot Irc Community Contributors. MIT License; see LICENSE for further details.
FAQs
IRC adapter for hubot
We found that hubot-irc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.