iirc 0.3.0 → 0.4.2

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/iirc/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IIRC
4
- VERSION = "0.3.0"
4
+ VERSION = "0.4.2"
5
5
  end
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"
@@ -12,6 +14,7 @@ require_relative "iirc/bot/channels"
12
14
  require_relative "iirc/bot/configure"
13
15
  require_relative "iirc/bot/formatting"
14
16
  require_relative "iirc/bot/hooks"
17
+ require_relative "iirc/bot/isupport"
15
18
  require_relative "iirc/bot/members"
16
19
  require_relative "iirc/bot/oper_up"
17
20
  require_relative "iirc/bot/parsing"
@@ -46,6 +49,8 @@ module IIRC
46
49
  local_host: local_host, local_port: local_port,
47
50
  ssl_context: ssl_context)
48
51
 
52
+ user_params[:nick] = self.name&.split('::').last if !user_params.key?(:nick)
53
+
49
54
  new(socket, **user_params).tap { |bot|
50
55
  bot.register!
51
56
  bot.tap(&blk) if blk
@@ -67,7 +72,7 @@ module IIRC
67
72
  include Bot::Formatting
68
73
  include Bot::AutoJoin
69
74
  include Bot::Verbs
70
- include Bot::AmbientVerbs
75
+ include Bot::Ambient
71
76
  include Bot::RegexHooks
72
77
  end
73
78
 
@@ -109,6 +114,8 @@ module IIRC
109
114
 
110
115
  Socket.tcp(host, port, local_host, local_port).then { |socket|
111
116
  if ssl_context
117
+ ssl_context = SSL.send(ssl_context) if ssl_context.is_a? Symbol
118
+
112
119
  OpenSSL::SSL::SSLSocket.new(socket, ssl_context).tap { |socket|
113
120
  socket.hostname = host
114
121
  socket.connect
@@ -122,4 +129,4 @@ end
122
129
 
123
130
  def IIRC(*args, **kwargs, &blk)
124
131
  Class.new(IIRC::Batteries, &blk)
125
- end
132
+ 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.3.0
4
+ version: 0.4.2
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-26 00:00:00.000000000 Z
11
+ date: 2022-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ircparser
@@ -33,6 +33,7 @@ extra_rdoc_files: []
33
33
  files:
34
34
  - ".github/workflows/main.yml"
35
35
  - ".gitignore"
36
+ - ".yardopts"
36
37
  - CHANGELOG.md
37
38
  - Gemfile
38
39
  - LICENSE
@@ -57,6 +58,7 @@ files:
57
58
  - lib/iirc/bot/ircv3/caps.rb
58
59
  - lib/iirc/bot/ircv3/labeled_requests.rb
59
60
  - lib/iirc/bot/ircv3/parsing.rb
61
+ - lib/iirc/bot/isupport.rb
60
62
  - lib/iirc/bot/members.rb
61
63
  - lib/iirc/bot/oper_up.rb
62
64
  - lib/iirc/bot/parsing.rb
@@ -69,6 +71,7 @@ files:
69
71
  - lib/iirc/bot/track_own_nick.rb
70
72
  - lib/iirc/bot/verbs.rb
71
73
  - lib/iirc/event.rb
74
+ - lib/iirc/numerics.rb
72
75
  - lib/iirc/sender.rb
73
76
  - lib/iirc/user.rb
74
77
  - lib/iirc/version.rb