omnibot 0.0.4 → 0.0.5
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/omnibot/jabberbot.rb +4 -2
- data/lib/omnibot/version.rb +1 -1
- data/lib/omnibot.rb +1 -0
- metadata +4 -4
data/lib/omnibot/jabberbot.rb
CHANGED
@@ -47,12 +47,14 @@ module OmniBot
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def on_generic_exception_handler e
|
50
|
-
if e && (e.kind_of?(Jabber::ServerDisconnected) || e.class.to_s =~ /^Errno::.+/)
|
50
|
+
if e && (e.kind_of?(Jabber::ServerDisconnected) || e.class.to_s =~ /^Errno::.+/ || e.kind_of?(SocketError))
|
51
51
|
OmniLog::error "No timer provider assigned" unless @timer_provider
|
52
52
|
# attempt counter is set when it's needed to connect
|
53
53
|
unless @ignore_reconnect
|
54
54
|
@timer_provider.add_timer(@reconnect_pause) { try_reconnect }
|
55
55
|
end
|
56
|
+
else
|
57
|
+
OmniLog::warn "Ignoring error #{e}"
|
56
58
|
end
|
57
59
|
end
|
58
60
|
|
@@ -115,7 +117,7 @@ module OmniBot
|
|
115
117
|
elsif amount < 60*60
|
116
118
|
return "less than a hour ago"
|
117
119
|
elsif amount < 60*60*6
|
118
|
-
return amount.div(
|
120
|
+
return amount.div(3600).to_s + " hours ago"
|
119
121
|
end
|
120
122
|
end
|
121
123
|
return orig.to_s
|
data/lib/omnibot/version.rb
CHANGED
data/lib/omnibot.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omnibot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- theirix
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-01-
|
18
|
+
date: 2011-01-25 00:00:00 +03:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|