vbot 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/vbot/bot_controller.rb +11 -9
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a26eb16cc5392ac9be8eedf0b9c706e9c5358b8a7029d6d981ef985dc2a8fef3
4
- data.tar.gz: 9cfddd516be8857a36329ad1a0ab491d32d2a356818abb7f1169ec877bd374f6
3
+ metadata.gz: cbd6cc2e2dfd28ae2f8893b75afce8d0192511f60973312ba473a8832c79f508
4
+ data.tar.gz: 12f33ad48558582c6173c3193f0b42e6c7119c4c82884dd6120db5af7db5de4b
5
5
  SHA512:
6
- metadata.gz: 2cb333b49d753ca52d3f32bee79931a12d5e0dc7cf4c4940bd429676ebb8ef22443fd9b46f244522307471ba63951a86d06295028dd42fb1c3aa86acf2a0ef46
7
- data.tar.gz: d784544a5bde7f884d27e15099493f48ce9690814b52bf117b6ddb14e39d196fc7e943b7db38c400a3bd0afcc43d6652365eda266906be71195bd6c7b1a0578e
6
+ metadata.gz: 501f5f443b9ee6b2da26a60c217b02e70cd5e4c33ae629296c408b70838539f22a887edf0f9e6ccc1a84a463073a01e32a94782ba758f1b60a3d062a08993332
7
+ data.tar.gz: ad2326258a4650b005e0d77f6d561dec6a899163cfdfac0d491e51d548a2da543276d699bae1a60b562ffe5a723954d619bd6a4f21e1ede156b7a39fedcfc412
@@ -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(msg)
174
- @socket.puts msg
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.2.1
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-04 00:00:00.000000000 Z
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.