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'
7
3
8
- Irc = require ' irc'
4
+ # Irc library
5
+ Irc = require ' irc'
9
6
10
7
class IrcBot extends Adapter
11
8
send : (user , strings ... ) ->
@@ -95,7 +92,7 @@ class IrcBot extends Adapter
95
92
nickpass : process .env .HUBOT_IRC_NICKSERV_PASSWORD
96
93
nickusername : process .env .HUBOT_IRC_NICKSERV_USERNAME
97
94
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 ?
99
96
unflood : process .env .HUBOT_IRC_UNFLOOD ?
100
97
debug : process .env .HUBOT_IRC_DEBUG ?
101
98
usessl : process .env .HUBOT_IRC_USESSL ?
@@ -109,7 +106,7 @@ class IrcBot extends Adapter
109
106
stripColors : true
110
107
secure : options .usessl
111
108
selfSigned : options .fakessl
112
- certExpire : options .certExpire
109
+ certExpired : options .certExpire
113
110
floodProtection : options .unflood
114
111
115
112
client_options[' channels' ] = options .rooms unless options .nickpass
@@ -177,9 +174,5 @@ class IrcBot extends Adapter
177
174
178
175
self .emit " connected"
179
176
180
- class IrcResponse extends Response
181
- notice : (strings ... ) ->
182
- @robot .adapter .notice @message .user , strings...
183
-
184
177
exports .use = (robot ) ->
185
178
new IrcBot robot
0 commit comments