omnibot 0.0.3 → 0.0.4
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 +9 -2
- data/lib/omnibot/omnisend.rb +5 -2
- data/lib/omnibot/version.rb +1 -1
- metadata +4 -4
data/lib/omnibot/jabberbot.rb
CHANGED
@@ -96,8 +96,15 @@ module OmniBot
|
|
96
96
|
def check_presence? presence
|
97
97
|
raise 'No subscriber' unless @subscriber
|
98
98
|
|
99
|
-
|
100
|
-
|
99
|
+
if presence.type == nil
|
100
|
+
OmniLog::debug "Subscriber status #{presence.show ? presence.show : 'online'}"
|
101
|
+
return presence.show == nil || presence.show == :chat
|
102
|
+
elsif presence.type == :unavailable
|
103
|
+
OmniLog::debug "Subscriber goes offline"
|
104
|
+
return false
|
105
|
+
else
|
106
|
+
return false
|
107
|
+
end
|
101
108
|
end
|
102
109
|
|
103
110
|
def say_when_human orig, now
|
data/lib/omnibot/omnisend.rb
CHANGED
@@ -3,8 +3,11 @@ module OmniBot
|
|
3
3
|
class OmniSend
|
4
4
|
|
5
5
|
def start args
|
6
|
-
|
7
|
-
|
6
|
+
if args.empty?
|
7
|
+
message = STDIN.readlines.join
|
8
|
+
else
|
9
|
+
message = args.join(' ')
|
10
|
+
end
|
8
11
|
puts "Sending message #{message}"
|
9
12
|
data = Marshal.dump(message)
|
10
13
|
|
data/lib/omnibot/version.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: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
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-11 00:00:00 +03:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|