Skip to content

Commit

Permalink
Cleaning up hubot dependencies, fixing certExpired in options
Browse files Browse the repository at this point in the history
  • Loading branch information
jgable committed Nov 6, 2012
1 parent 01b21f6 commit f25a7ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hubot-irc",
"version": "0.1.2",
"version": "0.1.3",
"author": "Fernando Ortiz <[email protected]>",
"description": "IRC adapter for Hubot 2.3",
"keywords": "hubot irc adapter",
Expand Down
19 changes: 6 additions & 13 deletions src/irc.coffee
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
Robot = require('hubot').Robot
Adapter = require('hubot').Adapter
TextMessage = require('hubot').TextMessage
EnterMessage = require('hubot').EnterMessage
LeaveMessage = require('hubot').LeaveMessage
Response = require('hubot').Response
# Hubot dependencies
{Robot, Adapter, TextMessage, EnterMessage, LeaveMessage, Response} = require 'hubot'

Irc = require 'irc'
# Irc library
Irc = require 'irc'

class IrcBot extends Adapter
send: (user, strings...) ->
Expand Down Expand Up @@ -95,7 +92,7 @@ class IrcBot extends Adapter
nickpass: process.env.HUBOT_IRC_NICKSERV_PASSWORD
nickusername: process.env.HUBOT_IRC_NICKSERV_USERNAME
fakessl: process.env.HUBOT_IRC_SERVER_FAKE_SSL?
certExpire: process.env.HUBOT_IRC_SERVER_CERT_EXPIRE?
certExpired: process.env.HUBOT_IRC_SERVER_CERT_EXPIRED?
unflood: process.env.HUBOT_IRC_UNFLOOD?
debug: process.env.HUBOT_IRC_DEBUG?
usessl: process.env.HUBOT_IRC_USESSL?
Expand All @@ -109,7 +106,7 @@ class IrcBot extends Adapter
stripColors: true
secure: options.usessl
selfSigned: options.fakessl
certExpire: options.certExpire
certExpired: options.certExpire
floodProtection: options.unflood

client_options['channels'] = options.rooms unless options.nickpass
Expand Down Expand Up @@ -177,9 +174,5 @@ class IrcBot extends Adapter

self.emit "connected"

class IrcResponse extends Response
notice: (strings...) ->
@robot.adapter.notice @message.user, strings...

exports.use = (robot) ->
new IrcBot robot

0 comments on commit f25a7ac

Please sign in to comment.