carrier-pigeon 0.4.0 → 0.5.0
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/README.org +23 -9
- data/carrier-pigeon.gemspec +1 -1
- data/lib/carrier-pigeon.rb +9 -0
- metadata +4 -4
data/README.org
CHANGED
@@ -1,8 +1,3 @@
|
|
1
|
-
* Requirements
|
2
|
-
|
3
|
-
- Ruby (MRI)
|
4
|
-
- RubyGems
|
5
|
-
|
6
1
|
* Install
|
7
2
|
|
8
3
|
: gem install carrier-pigeon
|
@@ -12,18 +7,37 @@
|
|
12
7
|
: require 'carrier-pigeon'
|
13
8
|
:
|
14
9
|
: # In the open
|
15
|
-
: CarrierPigeon.send(
|
10
|
+
: CarrierPigeon.send(
|
11
|
+
: :uri => "irc://nick:password@irc.domain.com:6667/#channel",
|
12
|
+
: :message => "cooooo, coo coo"
|
13
|
+
: )
|
16
14
|
:
|
17
15
|
: # SSL
|
18
|
-
: CarrierPigeon.send(
|
16
|
+
: CarrierPigeon.send(
|
17
|
+
: :uri => "irc://nick:password@irc.domain.com:6667/#channel",
|
18
|
+
: :message => "coo, secret plan",
|
19
|
+
: :ssl => true
|
20
|
+
: )
|
19
21
|
:
|
20
22
|
: # Join a channel (required for most Freenode channels)
|
21
|
-
: CarrierPigeon.send(
|
23
|
+
: CarrierPigeon.send(
|
24
|
+
: :uri => "irc://nick:password@irc.domain.com:6667/#channel",
|
25
|
+
: :message => "cooooo, part of the flock",
|
26
|
+
: :join => true
|
27
|
+
: )
|
22
28
|
:
|
23
29
|
: # Join a channel that requires a password
|
24
30
|
: CarrierPigeon.send(
|
25
31
|
: :uri => "irc://nick:password@irc.domain.com:6667/#channel",
|
26
|
-
: :
|
32
|
+
: :message => "coo, the password is ..."
|
33
|
+
: :channel_password => "secret",
|
34
|
+
: :join => true
|
35
|
+
: )
|
36
|
+
:
|
37
|
+
: # Register (ping reply) prior to joining or messaging a channel (required for some private servers)
|
38
|
+
: CarrierPigeon.send(
|
39
|
+
: :uri => "irc://nick:password@irc.domain.com:6667/#channel",
|
27
40
|
: :message => "cooooo, coo coo",
|
41
|
+
: :register_first => true,
|
28
42
|
: :join => true
|
29
43
|
: )
|
data/carrier-pigeon.gemspec
CHANGED
data/lib/carrier-pigeon.rb
CHANGED
@@ -23,6 +23,15 @@ class CarrierPigeon
|
|
23
23
|
sendln "NICK #{options[:nick]}"
|
24
24
|
sendln "USER #{options[:nick]} 0 * :#{options[:nick]}"
|
25
25
|
sendln options[:nickserv_command] if options[:nickserv_command]
|
26
|
+
if options[:register_first]
|
27
|
+
while line = @socket.gets
|
28
|
+
case line
|
29
|
+
when /^PING :(.+)$/i
|
30
|
+
sendln "PONG :#{$1}"
|
31
|
+
break
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
26
35
|
sendln "JOIN #{options[:channel]} #{options[:channel_password]}" if options[:join]
|
27
36
|
end
|
28
37
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carrier-pigeon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 5
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.5.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Sean Porter
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-
|
18
|
+
date: 2012-09-04 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|