File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ class IrcBot extends Adapter
93
93
server : process .env .HUBOT_IRC_SERVER
94
94
password : process .env .HUBOT_IRC_PASSWORD
95
95
nickpass : process .env .HUBOT_IRC_NICKSERV_PASSWORD
96
+ nickusername : process .env .HUBOT_IRC_NICKSERV_USERNAME
96
97
fakessl : process .env .HUBOT_IRC_SERVER_FAKE_SSL ?
97
98
unflood : process .env .HUBOT_IRC_UNFLOOD ?
98
99
debug : process .env .HUBOT_IRC_DEBUG ?
@@ -118,9 +119,16 @@ class IrcBot extends Adapter
118
119
user_id = {}
119
120
120
121
if options .nickpass ?
122
+ identify_args = " "
123
+
124
+ if options .nickusername ?
125
+ identify_args += " #{ options .nickusername } "
126
+
127
+ identify_args += " #{ options .nickpass } "
128
+
121
129
bot .addListener ' notice' , (from , to , text ) ->
122
- if from is ' NickServ' and text .indexOf (' registered ' ) isnt - 1
123
- bot .say ' NickServ' , " identify #{ options . nickpass } "
130
+ if from is ' NickServ' and text .indexOf (' identify ' ) isnt - 1
131
+ bot .say ' NickServ' , " identify #{ identify_args } "
124
132
else if options .nickpass and from is ' NickServ' and
125
133
(text .indexOf (' Password accepted' ) isnt - 1 or
126
134
text .indexOf (' identified' ) isnt - 1 )
You can’t perform that action at this time.
0 commit comments