potato 0.0.13 → 0.0.14
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/potato/irc/client.rb +5 -1
- data/lib/potato/irc/events.rb +11 -5
- data/lib/potato/irc/server.rb +1 -0
- data/lib/potato/version.rb +1 -1
- metadata +2 -2
data/lib/potato/irc/client.rb
CHANGED
@@ -356,7 +356,11 @@ Type /pass yourpassword to authenticate.
|
|
356
356
|
str = opts[:colon] ? ":" : ""
|
357
357
|
str << opts[:cmd] << " " << Array(opts[:args]).join(" ")
|
358
358
|
str << " :#{opts[:content]}" if opts[:content]
|
359
|
-
|
359
|
+
begin
|
360
|
+
@socket.write(str + "\r\n")
|
361
|
+
rescue Errno::ETIMEDOUT
|
362
|
+
close
|
363
|
+
end
|
360
364
|
debug str
|
361
365
|
end
|
362
366
|
|
data/lib/potato/irc/events.rb
CHANGED
@@ -33,13 +33,19 @@ module Potato
|
|
33
33
|
# @param [IRC::Packet] pkt
|
34
34
|
# @return [void]
|
35
35
|
def on_who pkt
|
36
|
-
|
37
|
-
|
38
|
-
|
36
|
+
Thread.new do
|
37
|
+
loop do
|
38
|
+
break if @users[pkt.args[0].sub("#", "")]
|
39
|
+
sleep 1
|
40
|
+
end
|
41
|
+
users = @users[pkt.args[0].sub("#", "")].map(&:first)
|
42
|
+
users.uniq.each do |user|
|
43
|
+
send_packet :cmd => "localhost", :args => [352, @config.nick, pkt.args[0], user,
|
39
44
|
host_for(user), "localhost", user], :content => "0 #{user}"
|
40
|
-
|
41
|
-
|
45
|
+
end
|
46
|
+
send_packet :cmd => "localhost", :args => [315, @config.nick, pkt.args[0]],
|
42
47
|
:content => "End of /WHO list."
|
48
|
+
end
|
43
49
|
end
|
44
50
|
|
45
51
|
# @param [IRC::Packet] pkt
|
data/lib/potato/irc/server.rb
CHANGED
data/lib/potato/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: potato
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
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: 2011-
|
12
|
+
date: 2011-06-23 00:00:00.000000000 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
description: Potato is an IRC server that communicates with the deviantART Message
|