Skip to content

add default var and sasl #183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/irc.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,9 @@ class IrcBot extends Adapter

options =
nick: process.env.HUBOT_IRC_NICK or @robot.name
realName: process.env.HUBOT_IRC_REALNAME
port: process.env.HUBOT_IRC_PORT
userName: process.env.HUBOT_IRC_USERNAME or @robot.name
realName: process.env.HUBOT_IRC_REALNAME or 'nodeJS IRC client'
port: process.env.HUBOT_IRC_PORT or 6667
rooms: process.env.HUBOT_IRC_ROOMS.split(",")
ignoreUsers: process.env.HUBOT_IRC_IGNORE_USERS?.split(",") or []
server: process.env.HUBOT_IRC_SERVER
Expand All @@ -176,7 +177,6 @@ class IrcBot extends Adapter
unflood: process.env.HUBOT_IRC_UNFLOOD
debug: process.env.HUBOT_IRC_DEBUG?
usessl: process.env.HUBOT_IRC_USESSL?
userName: process.env.HUBOT_IRC_USERNAME
usesasl: process.env.HUBOT_IRC_USESASL?

client_options =
Expand Down Expand Up @@ -222,7 +222,10 @@ class IrcBot extends Adapter
text.indexOf('identified') isnt -1)
for room in options.rooms
@join room

else if from is 'SaslServ' and text.indexOf('Last login from') isnt -1
for room in options.rooms
@join room

if options.connectCommand?
bot.addListener 'registered', (message) ->
# The 'registered' event is fired when you are connected to the server
Expand Down