Skip to content

Commit f25a7ac

Browse files
committed
Cleaning up hubot dependencies, fixing certExpired in options
1 parent 01b21f6 commit f25a7ac

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hubot-irc",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"author": "Fernando Ortiz <[email protected]>",
55
"description": "IRC adapter for Hubot 2.3",
66
"keywords": "hubot irc adapter",

src/irc.coffee

+6-13
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
Robot = require('hubot').Robot
2-
Adapter = require('hubot').Adapter
3-
TextMessage = require('hubot').TextMessage
4-
EnterMessage = require('hubot').EnterMessage
5-
LeaveMessage = require('hubot').LeaveMessage
6-
Response = require('hubot').Response
1+
# Hubot dependencies
2+
{Robot, Adapter, TextMessage, EnterMessage, LeaveMessage, Response} = require 'hubot'
73

8-
Irc = require 'irc'
4+
# Irc library
5+
Irc = require 'irc'
96

107
class IrcBot extends Adapter
118
send: (user, strings...) ->
@@ -95,7 +92,7 @@ class IrcBot extends Adapter
9592
nickpass: process.env.HUBOT_IRC_NICKSERV_PASSWORD
9693
nickusername: process.env.HUBOT_IRC_NICKSERV_USERNAME
9794
fakessl: process.env.HUBOT_IRC_SERVER_FAKE_SSL?
98-
certExpire: process.env.HUBOT_IRC_SERVER_CERT_EXPIRE?
95+
certExpired: process.env.HUBOT_IRC_SERVER_CERT_EXPIRED?
9996
unflood: process.env.HUBOT_IRC_UNFLOOD?
10097
debug: process.env.HUBOT_IRC_DEBUG?
10198
usessl: process.env.HUBOT_IRC_USESSL?
@@ -109,7 +106,7 @@ class IrcBot extends Adapter
109106
stripColors: true
110107
secure: options.usessl
111108
selfSigned: options.fakessl
112-
certExpire: options.certExpire
109+
certExpired: options.certExpire
113110
floodProtection: options.unflood
114111

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

178175
self.emit "connected"
179176

180-
class IrcResponse extends Response
181-
notice: (strings...) ->
182-
@robot.adapter.notice @message.user, strings...
183-
184177
exports.use = (robot) ->
185178
new IrcBot robot

0 commit comments

Comments
 (0)