cinch 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/cinch/bot.rb +1 -1
- data/lib/cinch/configuration/bot.rb +1 -1
- data/lib/cinch/irc.rb +6 -5
- data/lib/cinch/message.rb +3 -2
- data/lib/cinch/user.rb +8 -1
- data/lib/cinch/version.rb +1 -1
- metadata +2 -2
data/lib/cinch/bot.rb
CHANGED
@@ -8,7 +8,7 @@ module Cinch
|
|
8
8
|
:realname, :user, :messages_per_second, :server_queue_size,
|
9
9
|
:strictness, :message_split_start, :message_split_end,
|
10
10
|
:max_messages, :plugins, :channels, :encoding, :reconnect, :max_reconnect_delay,
|
11
|
-
:local_host, :timeouts, :ping_interval, :dcc, :shared, :sasl]
|
11
|
+
:local_host, :timeouts, :ping_interval, :delay_joins, :dcc, :shared, :sasl]
|
12
12
|
|
13
13
|
# (see Configuration.default_config)
|
14
14
|
def self.default_config
|
data/lib/cinch/irc.rb
CHANGED
@@ -244,8 +244,6 @@ module Cinch
|
|
244
244
|
|
245
245
|
if msg.command == "PRIVMSG"
|
246
246
|
events << [:message]
|
247
|
-
else
|
248
|
-
events << [:notice]
|
249
247
|
end
|
250
248
|
|
251
249
|
if msg.action?
|
@@ -492,11 +490,14 @@ module Cinch
|
|
492
490
|
|
493
491
|
def on_nick(msg, events)
|
494
492
|
if msg.user == @bot
|
495
|
-
@bot.set_nick msg.params.last
|
493
|
+
# @bot.set_nick msg.params.last
|
494
|
+
target = @bot
|
495
|
+
else
|
496
|
+
target = msg.user
|
496
497
|
end
|
497
498
|
|
498
|
-
|
499
|
-
|
499
|
+
target.update_nick(msg.params.last)
|
500
|
+
target.online = true
|
500
501
|
end
|
501
502
|
|
502
503
|
def on_part(msg, events)
|
data/lib/cinch/message.rb
CHANGED
@@ -228,9 +228,10 @@ module Cinch
|
|
228
228
|
when Constants::RPL_NAMEREPLY.to_s
|
229
229
|
@bot.channel_list.find_ensured(@params[2])
|
230
230
|
else
|
231
|
-
|
231
|
+
chantypes = @bot.irc.isupport["CHANTYPES"]
|
232
|
+
if chantypes.include?(@params.first[0])
|
232
233
|
@bot.channel_list.find_ensured(@params.first)
|
233
|
-
elsif numeric_reply? and @params[1]
|
234
|
+
elsif numeric_reply? and chantypes.include?(@params[1][0])
|
234
235
|
@bot.channel_list.find_ensured(@params[1])
|
235
236
|
end
|
236
237
|
end
|
data/lib/cinch/user.rb
CHANGED
@@ -134,6 +134,11 @@ module Cinch
|
|
134
134
|
!attr(:authname).nil?
|
135
135
|
end
|
136
136
|
|
137
|
+
# @see Syncable#attr
|
138
|
+
def attr(attribute, data = true, unsync = false)
|
139
|
+
super
|
140
|
+
end
|
141
|
+
|
137
142
|
# Queries the IRC server for information on the user. This will
|
138
143
|
# set the User's state to not synced. After all information are
|
139
144
|
# received, the object will be set back to synced.
|
@@ -194,6 +199,7 @@ module Cinch
|
|
194
199
|
:authname => nil,
|
195
200
|
:idle => 0,
|
196
201
|
:secure? => false,
|
202
|
+
:channels => [],
|
197
203
|
}.merge(values).each do |attr, value|
|
198
204
|
sync(attr, value, true)
|
199
205
|
end
|
@@ -272,7 +278,8 @@ module Cinch
|
|
272
278
|
refresh
|
273
279
|
@monitored_timer = Timer.new(@bot, interval: 30) {
|
274
280
|
refresh
|
275
|
-
}
|
281
|
+
}
|
282
|
+
@monitored_timer.start
|
276
283
|
end
|
277
284
|
|
278
285
|
@monitored = true
|
data/lib/cinch/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cinch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
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: 2012-
|
12
|
+
date: 2012-06-27 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A simple, friendly DSL for creating IRC bots
|
15
15
|
email:
|