nakiircbot 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0a730c87c3b3d41670bf1a9b3be778c01ec4e92e66c996fc9673876b9ae3bced
4
- data.tar.gz: b3aef7375122b38a2c352d746962b629200fe32d99648dd2d4ffe1e144a8d6e1
3
+ metadata.gz: a672981dae3300506bc3d7579009d6bc2ada58a1b38ed0b4afbc39d471de2a03
4
+ data.tar.gz: 72997bb910adc17459132b1deef79bec1015c8ea523e041931496d678594225c
5
5
  SHA512:
6
- metadata.gz: e786766517a178e20a3de5eed2f1eeb51803eb9cc5b2bcfdf209a1de072509e57bad069289321f5a154fcf797483b2cca62ec8cff193b4697c41e7f741e2638c
7
- data.tar.gz: 11ff7989502f426d5f3f8ba0fbe04d8f6dfad87b2fec57f8c991eece8be31a3c8b6496cc663f2105fe611ebff5ecb5a52782167cf63e751d2cd62db22bafe27d
6
+ metadata.gz: c6669d5ac757e78e7c0856722f36f132cb3d7a2bfa0efb30e0dab7711bbf89c9b6bea39d86bceca93268440449add073924749666960098833e31eed885efa03
7
+ data.tar.gz: 69df584be01ac7a4e3077bed9e2699d605f250747ab5ee1fac041b0051ab3abadc92a95600107e0b27c813be9b707a89c4bf8a9029dc14c2e96ea546210294bf
data/lib/nakiircbot.rb CHANGED
@@ -3,7 +3,7 @@ module NakiIRCBot
3
3
  # class << self
4
4
  # attr_accessor :channels
5
5
  # end
6
- def self.start server, port, bot_name, master_name, welcome001, *channels, password: nil, masterword: nil, processors: [], tags: false
6
+ def self.start server, port, bot_name, master_name, welcome001, *channels, identity: nil, password: nil, masterword: nil, processors: [], tags: false
7
7
  # @@channels.replace channels.dup
8
8
 
9
9
  abort "matching bot_name and master_name may cause infinite recursion" if bot_name == master_name
@@ -34,7 +34,7 @@ module NakiIRCBot
34
34
  socket.send str + "\n", 0
35
35
  end
36
36
  # socket.send "PASS #{password.strip}\n", 0 if twitch
37
- socket_send.call "CAP REQ :sasl"
37
+ socket_send.call "CAP REQ :sasl" if password
38
38
  socket_send.call "NICK #{bot_name}"
39
39
  socket_send.call "USER #{bot_name} #{bot_name} #{bot_name} #{bot_name}" #unless twitch
40
40
 
@@ -98,7 +98,7 @@ module NakiIRCBot
98
98
  next socket_send.call "AUTHENTICATE PLAIN"
99
99
  when /\AAUTHENTICATE \+\z/
100
100
  logger.info "password"
101
- next socket.send "AUTHENTICATE #{Base64.strict_encode64 "#{bot_name}\0#{bot_name}\0#{password}"}\n", 0
101
+ next socket.send "AUTHENTICATE #{Base64.strict_encode64 "\0#{identity || bot_name}\0#{password}"}\n", 0
102
102
  when /\A:[a-z]+\.libera\.chat 903 #{bot_name} :SASL authentication successful\z/
103
103
  next socket_send.call "CAP END"
104
104
 
data/nakiircbot.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "nakiircbot"
3
- spec.version = "0.1.3"
3
+ spec.version = "0.1.4"
4
4
  spec.summary = "IRC bot framework"
5
5
 
6
6
  spec.author = "Victor Maslov aka Nakilon"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nakiircbot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Maslov aka Nakilon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-15 00:00:00.000000000 Z
11
+ date: 2021-12-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: nakilon@gmail.com