nakiircbot 0.0.0 → 0.0.2

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
  SHA1:
3
- metadata.gz: 3fd605975fa07fb8ad61f317912b32c6d9525a46
4
- data.tar.gz: a6a9a41301909099d2e71d57101232b22c1bbbf1
3
+ metadata.gz: d8ca18800562c7c0fd329e997bee46f5b27d8dba
4
+ data.tar.gz: 20fa8cd1ceab4294bd91178fe65ebde49618d7ac
5
5
  SHA512:
6
- metadata.gz: 46f06a8b677e230df7543238d94cf9321bae53e7dcf9144e74bea95aa030e947e90cc6361672fa7bab9672118f7643b1488c923b39a3ff0425b640ace7e81b06
7
- data.tar.gz: 0fdd39f22e6bb874c380a368638a463a0a013019888883b65e5d059829234653e49c15e2481c24036a3344563c72e01012f9825cc23d08ff52b220bd5099e0eb
6
+ metadata.gz: aeb84857a8086ec6cf62cc907968820aff82513b0795793c49b73567f47a18243a10130584e02086f34af04a35cfbe00c812f976e6d641db1779a090ada1a4d1
7
+ data.tar.gz: '0081fc35339b93b87d2e08dd0b6ee5855df5675fc44fa3b8c9d33a0c8bdbfc5a9808225162aa1b3f3864e1adb61ca616984ff7fe97807877b7b2e7c1896ab2be'
data/lib/nakiircbot.rb CHANGED
@@ -33,7 +33,7 @@ module NakiIRCBot
33
33
  logger.info "> #{str}"
34
34
  socket.send str + "\n", 0
35
35
  end
36
- socket_send.call "PASS #{password.strip}" if twitch
36
+ socket.send "PASS #{password.strip}\n", 0 if twitch
37
37
  socket_send.call "NICK #{bot_name}"
38
38
  socket_send.call "USER #{bot_name} #{bot_name} #{bot_name} #{bot_name}" unless twitch
39
39
 
@@ -91,6 +91,11 @@ module NakiIRCBot
91
91
  logger.info "password"
92
92
  # next socket.send "PASS #{password.strip}\n", 0
93
93
  next socket.send "PRIVMSG NickServ :identify #{bot_name} #{password.strip}\n", 0
94
+ # TODO: get rid of this Libera hard code
95
+ when /\A:NickServ!NickServ@services\.libera\.chat NOTICE #{Regexp.escape bot_name} :This nickname is registered. Please choose a different nickname, or identify via \x02\/msg NickServ IDENTIFY #{Regexp.escape bot_name} <password>\x02\z/
96
+ abort "no password" unless password
97
+ logger.info "password"
98
+ next socket.send "PRIVMSG NickServ :identify #{bot_name} #{password.strip}\n", 0
94
99
  when /\APING :/
95
100
  next socket.send "PONG :#{$'}\n", 0 # Quakenet uses timestamp, Freenode and Twitch use server name
96
101
  when /\A:([^!]+)!\S+ PRIVMSG #{Regexp.escape bot_name} :\x01VERSION\x01\z/
data/nakiircbot.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "nakiircbot"
3
- spec.version = "0.0.0"
3
+ spec.version = "0.0.2"
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.0.0
4
+ version: 0.0.2
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-05-13 00:00:00.000000000 Z
11
+ date: 2021-05-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: nakilon@gmail.com