From f25a7ac7b4df5205e914b3afe745400722171b2d Mon Sep 17 00:00:00 2001 From: Jacob Gable Date: Tue, 6 Nov 2012 16:32:08 -0600 Subject: [PATCH] Cleaning up hubot dependencies, fixing certExpired in options --- package.json | 2 +- src/irc.coffee | 19 ++++++------------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 3fccb21..feb8cbd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hubot-irc", - "version": "0.1.2", + "version": "0.1.3", "author": "Fernando Ortiz ", "description": "IRC adapter for Hubot 2.3", "keywords": "hubot irc adapter", diff --git a/src/irc.coffee b/src/irc.coffee index 22c7e52..9ee584e 100644 --- a/src/irc.coffee +++ b/src/irc.coffee @@ -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...) -> @@ -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? @@ -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 @@ -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