vbot 0.2.1 → 0.3.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/lib/vbot/bot_controller.rb +11 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbd6cc2e2dfd28ae2f8893b75afce8d0192511f60973312ba473a8832c79f508
|
4
|
+
data.tar.gz: 12f33ad48558582c6173c3193f0b42e6c7119c4c82884dd6120db5af7db5de4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 501f5f443b9ee6b2da26a60c217b02e70cd5e4c33ae629296c408b70838539f22a887edf0f9e6ccc1a84a463073a01e32a94782ba758f1b60a3d062a08993332
|
7
|
+
data.tar.gz: ad2326258a4650b005e0d77f6d561dec6a899163cfdfac0d491e51d548a2da543276d699bae1a60b562ffe5a723954d619bd6a4f21e1ede156b7a39fedcfc412
|
data/lib/vbot/bot_controller.rb
CHANGED
@@ -95,31 +95,31 @@ module Vbot
|
|
95
95
|
##
|
96
96
|
# Gives nick to server.
|
97
97
|
def nick_to_server
|
98
|
-
"NICK #{@nick}\r\n"
|
98
|
+
["NICK #{@nick}\r\n"]
|
99
99
|
end
|
100
100
|
|
101
101
|
##
|
102
102
|
# Identifies with server.
|
103
103
|
def ident_with_server
|
104
|
-
"USER #{@ident} * 8 :#{@gecos}\r\n"
|
104
|
+
["USER #{@ident} * 8 :#{@gecos}\r\n"]
|
105
105
|
end
|
106
106
|
|
107
107
|
##
|
108
108
|
# Joins to channel on IRC server.
|
109
109
|
def join_to_channel
|
110
|
-
"JOIN #{@chan}\r\n"
|
110
|
+
["JOIN #{@chan}\r\n"]
|
111
111
|
end
|
112
112
|
|
113
113
|
##
|
114
114
|
# Quits IRC server.
|
115
115
|
def quit_from_server
|
116
|
-
'QUIT'
|
116
|
+
['QUIT']
|
117
117
|
end
|
118
118
|
|
119
119
|
##
|
120
120
|
# Handles ping message from server.
|
121
121
|
def handle_ping token
|
122
|
-
"PONG #{token}"
|
122
|
+
["PONG #{token}"]
|
123
123
|
end
|
124
124
|
|
125
125
|
##
|
@@ -154,9 +154,9 @@ module Vbot
|
|
154
154
|
# Executes command subroutines.
|
155
155
|
def exec_command_subroutine(command_hash)
|
156
156
|
if command_hash[:command].upcase == 'HOWDY' && command_hash[:pm] == true
|
157
|
-
"PRIVMSG #{command_hash[:reply_to]} :Howdy, #{command_hash[:reply_to]}.\r\n"
|
157
|
+
["PRIVMSG #{command_hash[:reply_to]} :Howdy, #{command_hash[:reply_to]}.\r\n"]
|
158
158
|
elsif command_hash[:command].upcase == 'HOWDY' && command_hash[:pm] == false
|
159
|
-
"PRIVMSG #{@chan} :Howdy, #{command_hash[:reply_to]}.\r\n"
|
159
|
+
["PRIVMSG #{@chan} :Howdy, #{command_hash[:reply_to]}.\r\n"]
|
160
160
|
end
|
161
161
|
end
|
162
162
|
|
@@ -170,8 +170,10 @@ module Vbot
|
|
170
170
|
|
171
171
|
##
|
172
172
|
# Writes to socket output.
|
173
|
-
def send_message(
|
174
|
-
|
173
|
+
def send_message(messages)
|
174
|
+
messages.each do |msg|
|
175
|
+
@socket.puts msg
|
176
|
+
end
|
175
177
|
end
|
176
178
|
end
|
177
179
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Davis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: 'vbot is an IRC bot library that aims to be make building and extending
|
14
14
|
IRC bots more efficient.
|