twitch-bot 5.0.1 → 5.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/twitch/bot/adapter/irc.rb +7 -6
- data/lib/twitch/bot/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e01b9b202dc484cc6f55788d1adc6cc7b6272c1bb3ff67fcb2e0615956ea761
|
4
|
+
data.tar.gz: d819d7d5be9b59fdbdf9bcb1ebb100272f79fcb8377a887ad3e4450aee3b437a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96ab9830ae76529ef3f8f92e9876fb043e01afa2f7d4ee354dae4014e377df3f3e427c1a6f54dfdb515e7b2ec0018416f39874420f74e5659f8d83453b2d293b
|
7
|
+
data.tar.gz: 16a25b0062f8a1066442305ffc54c6d9ed1b573bfc836f990830f6c075738c6438876da82bdc4caa0220e88f1fa5e1cbd64ab151e7479fadb4dba00378dbda28
|
data/CHANGELOG.md
CHANGED
@@ -9,6 +9,7 @@ module Twitch
|
|
9
9
|
class Irc
|
10
10
|
def initialize(client:)
|
11
11
|
@client = client
|
12
|
+
@channel = nil
|
12
13
|
|
13
14
|
open_socket
|
14
15
|
end
|
@@ -29,7 +30,7 @@ module Twitch
|
|
29
30
|
end
|
30
31
|
|
31
32
|
def send_message(text)
|
32
|
-
privmsg = "PRIVMSG ##{channel.name} :#{text}"
|
33
|
+
privmsg = "PRIVMSG ##{@channel.name} :#{text}"
|
33
34
|
send_data(privmsg)
|
34
35
|
end
|
35
36
|
|
@@ -37,19 +38,19 @@ module Twitch
|
|
37
38
|
send_data_to_socket(data)
|
38
39
|
end
|
39
40
|
|
40
|
-
def join_channel(
|
41
|
-
@channel =
|
42
|
-
send_data "JOIN ##{channel.name}"
|
41
|
+
def join_channel(channel_object)
|
42
|
+
@channel = channel_object
|
43
|
+
send_data "JOIN ##{@channel.name}"
|
43
44
|
end
|
44
45
|
|
45
46
|
def part_channel
|
46
|
-
send_data "PART ##{channel.name}"
|
47
|
+
send_data "PART ##{@channel.name}" if @channel
|
47
48
|
@channel = nil
|
48
49
|
end
|
49
50
|
|
50
51
|
private
|
51
52
|
|
52
|
-
attr_reader :socket, :client
|
53
|
+
attr_reader :socket, :client
|
53
54
|
|
54
55
|
def open_socket
|
55
56
|
@socket = ::TCPSocket.new(
|
data/lib/twitch/bot/version.rb
CHANGED