vbot 0.3.1 → 0.4.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/vbot/bot_controller.rb +6 -17
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 87606528068375aaf6bcf88c797fe254728e1a9cebf6ac407ce2bbfe08e7c55f
4
- data.tar.gz: 488f02339829ecb85716f009a8808e00ae1c60850d37a982801a69f74e515a1e
3
+ metadata.gz: 287c56b970ff91182775543f12eb1cbb70f79a0033d0f16ea2989e051a4aba18
4
+ data.tar.gz: 6fb2761d1d33ec26afec2fa16312a0b1cddfbac59aad70ea1d879930fa3fe3ea
5
5
  SHA512:
6
- metadata.gz: b150273240a5f5c7a5e7988d3286d780de0410621ed0b0dae92ae027ee59ad3e685e73d25e2d0eed6320f0ed006b4fc3c0859bfe3d3a68827a3bbcbf7c0509a9
7
- data.tar.gz: 1fcfdb33070be9575a0971b6fedd6d846ed3d0b2c29063654e143744f1ab556902bfa6dd730436193a6cf31a61ae4466a5dc5fb4421b5aa178b6578da4cdf653
6
+ metadata.gz: 6fab12de5db34aa68a8a6bd8740359ef9c7852f4c3e6e014180cb0aa68847de1a346000f9f7adc53c8c8344a4fbe8ae101aa1299da64b54228f99a9b74e2c748
7
+ data.tar.gz: 7d89ff73092ec841a8935f747c00b4f1fa52b4114fc203c060bf5c21b3afa74ded1062916f321434c5e12b8333a4eea14f751b2476dce5a734b328a1c57c9d9f
@@ -110,18 +110,18 @@ module Vbot
110
110
  ["JOIN #{@chan}\r\n"]
111
111
  end
112
112
 
113
- ##
114
- # Quits IRC server.
115
- def quit_from_server
116
- ['QUIT']
117
- end
118
-
119
113
  ##
120
114
  # Handles ping message from server.
121
115
  def handle_ping token
122
116
  ["PONG #{token}"]
123
117
  end
124
118
 
119
+ ##
120
+ # Quits IRC server.
121
+ def quit_from_server
122
+ ['QUIT']
123
+ end
124
+
125
125
  ##
126
126
  # Gets the nick to reply to.
127
127
  def get_nick_rt(raw_rt)
@@ -150,22 +150,11 @@ module Vbot
150
150
  }
151
151
  end
152
152
 
153
- ##
154
- # Executes command subroutines.
155
- def exec_command_subroutine(command_hash)
156
- if command_hash[:command].upcase == 'HOWDY' && command_hash[:pm] == true
157
- ["PRIVMSG #{command_hash[:reply_to]} :Howdy, #{command_hash[:reply_to]}.\r\n"]
158
- elsif command_hash[:command].upcase == 'HOWDY' && command_hash[:pm] == false
159
- ["PRIVMSG #{@chan} :Howdy, #{command_hash[:reply_to]}.\r\n"]
160
- end
161
- end
162
-
163
153
  ##
164
154
  # Performs logic on message to determine response.
165
155
  def parse_message(data)
166
156
  return handle_ping data[1] if data[0] == 'PING'
167
157
  return join_to_channel if data[1] == '376' || data[1] == '422'
168
- return exec_command_subroutine(interpret_command(data)) if data[1] == 'PRIVMSG' && (data[3] == ":#{@nick}" || data[3] == ':<>')
169
158
  end
170
159
 
171
160
  ##
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.3.1
4
+ version: 0.4.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-07 00:00:00.000000000 Z
11
+ date: 2018-11-30 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.