iirc 0.3.0 → 0.4.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/Rakefile +59 -0
- data/lib/iirc/bot/ambient.rb +46 -45
- data/lib/iirc/bot.rb +1 -1
- data/lib/iirc/numerics.rb +1252 -0
- data/lib/iirc/version.rb +1 -1
- data/lib/iirc.rb +8 -2
- metadata +3 -2
data/lib/iirc/version.rb
CHANGED
data/lib/iirc.rb
CHANGED
@@ -4,6 +4,8 @@ require_relative "iirc/event"
|
|
4
4
|
require_relative "iirc/sender"
|
5
5
|
require_relative "iirc/user"
|
6
6
|
|
7
|
+
require_relative "iirc/numerics"
|
8
|
+
|
7
9
|
require_relative "iirc/bot"
|
8
10
|
require_relative "iirc/bot/accept_invites"
|
9
11
|
require_relative "iirc/bot/ambient"
|
@@ -46,6 +48,8 @@ module IIRC
|
|
46
48
|
local_host: local_host, local_port: local_port,
|
47
49
|
ssl_context: ssl_context)
|
48
50
|
|
51
|
+
user_params[:nick] = self.name&.split('::').last if !user_params.key?(:nick)
|
52
|
+
|
49
53
|
new(socket, **user_params).tap { |bot|
|
50
54
|
bot.register!
|
51
55
|
bot.tap(&blk) if blk
|
@@ -67,7 +71,7 @@ module IIRC
|
|
67
71
|
include Bot::Formatting
|
68
72
|
include Bot::AutoJoin
|
69
73
|
include Bot::Verbs
|
70
|
-
include Bot::
|
74
|
+
include Bot::Ambient
|
71
75
|
include Bot::RegexHooks
|
72
76
|
end
|
73
77
|
|
@@ -109,6 +113,8 @@ module IIRC
|
|
109
113
|
|
110
114
|
Socket.tcp(host, port, local_host, local_port).then { |socket|
|
111
115
|
if ssl_context
|
116
|
+
ssl_context = SSL.send(ssl_context) if ssl_context.is_a? Symbol
|
117
|
+
|
112
118
|
OpenSSL::SSL::SSLSocket.new(socket, ssl_context).tap { |socket|
|
113
119
|
socket.hostname = host
|
114
120
|
socket.connect
|
@@ -122,4 +128,4 @@ end
|
|
122
128
|
|
123
129
|
def IIRC(*args, **kwargs, &blk)
|
124
130
|
Class.new(IIRC::Batteries, &blk)
|
125
|
-
end
|
131
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iirc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mooff
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ircparser
|
@@ -69,6 +69,7 @@ files:
|
|
69
69
|
- lib/iirc/bot/track_own_nick.rb
|
70
70
|
- lib/iirc/bot/verbs.rb
|
71
71
|
- lib/iirc/event.rb
|
72
|
+
- lib/iirc/numerics.rb
|
72
73
|
- lib/iirc/sender.rb
|
73
74
|
- lib/iirc/user.rb
|
74
75
|
- lib/iirc/version.rb
|