ref: 04f5e130140d3a42306923498cb69ea80982357c
parent: 50627eeeb4d43d5454699c4a066dfa1e8257c16a
author: 0x4A4D00 <scorpion_rn@yahoo.com>
date: Sun Jul 30 19:41:11 EDT 2023
INVITE Callback Removed - Ruby-IRC can't Handle that
--- a/.idea/irc-h2o-bot.iml
+++ b/.idea/irc-h2o-bot.iml
@@ -12,19 +12,5 @@
<orderEntry type="jdk" jdkName="ruby-3.2.1-p31" jdkType="RUBY_SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="Ruby-IRC (v1.0.13, ruby-3.2.1-p31) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="async (v2.6.2, ruby-3.2.1-p31) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="async-http (v0.60.2, ruby-3.2.1-p31) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="async-io (v1.35.0, ruby-3.2.1-p31) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="async-pool (v0.4.0, ruby-3.2.1-p31) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="console (v1.17.4, ruby-3.2.1-p31) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="fiber-annotation (v0.2.0, ruby-3.2.1-p31) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="fiber-local (v1.0.0, ruby-3.2.1-p31) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="io-event (v1.2.2, ruby-3.2.1-p31) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="protocol-hpack (v1.4.2, ruby-3.2.1-p31) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="protocol-http (v0.24.4, ruby-3.2.1-p31) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="protocol-http1 (v0.15.0, ruby-3.2.1-p31) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="protocol-http2 (v0.15.1, ruby-3.2.1-p31) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="timers (v4.3.5, ruby-3.2.1-p31) [gem]" level="application" />
- <orderEntry type="library" scope="PROVIDED" name="traces (v0.11.1, ruby-3.2.1-p31) [gem]" level="application" />
</component>
</module>
\ No newline at end of file
--- a/bot.rb
+++ b/bot.rb
@@ -94,13 +94,8 @@
IRCConnection.add_IO_socket(STDIN)
IRCEvent.add_callback('endofmotd') { |event| $bot.add_channel('#fpc') }
-IRCEvent.add_callback('invite') do |event|
- puts event.message
- puts event.channel
- $bot.add_channel(event.message)
-end
-
IRCEvent.add_callback('privmsg') {|event|
+
if event.channel.eql?(BotNick) # pv message
begin
if (event.message.start_with?(".invite")) # invite message