cinch-identify 1.6.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cinch/plugins/identify.rb +8 -3
- metadata +2 -2
@@ -37,7 +37,8 @@ module Cinch
|
|
37
37
|
match(/^Password accepted - you are now recognized\./, use_prefix: false, use_suffix: false, react_on: :private, method: :identified_nickserv)
|
38
38
|
match(/^Hasło przyjęte - jesteś zidentyfikowany/, use_prefix: false, use_suffix: false, react_on: :private, method: :identified_nickserv)
|
39
39
|
def identified_nickserv(m)
|
40
|
-
|
40
|
+
service_name = config[:service_name] || "nickserv"
|
41
|
+
if m.user == User(service_name) && config[:type] == :nickserv
|
41
42
|
debug "Identified with NickServ"
|
42
43
|
@bot.handlers.dispatch :identified, m
|
43
44
|
end
|
@@ -72,6 +73,7 @@ module Cinch
|
|
72
73
|
match(/^You are now logged in as/, use_prefix: false, use_suffix: false, react_on: :notice, method: :identified_userserv)
|
73
74
|
def identified_userserv(m)
|
74
75
|
service_name = config[:service_name] || "UserServ"
|
76
|
+
service_name = service_name.split("@").first
|
75
77
|
if m.user == User(service_name) && config[:type] == :userserv
|
76
78
|
debug "Identified with UserServ"
|
77
79
|
@bot.handlers.dispatch :identified, m
|
@@ -92,11 +94,14 @@ module Cinch
|
|
92
94
|
end
|
93
95
|
|
94
96
|
def identify_nickserv
|
97
|
+
service_name = config[:service_name] || "nickserv"
|
98
|
+
service_name = service_name.split("@").first
|
95
99
|
if config[:username]
|
96
|
-
|
100
|
+
cmd = "identify %s %s" % [config[:username], config[:password]]
|
97
101
|
else
|
98
|
-
|
102
|
+
cmd = "identify %s" % [config[:password]]
|
99
103
|
end
|
104
|
+
User(service_name).send(cmd)
|
100
105
|
end
|
101
106
|
|
102
107
|
def identify_kreynet
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cinch-identify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-03-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cinch
|