ref: 121d5afb4a01324304795df3f46e2b1a8d29db2e
author: 0x4A4D00 <scorpion_rn@yahoo.com>
date: Sun Jul 9 17:30:10 EDT 2023
Base Commit
--- /dev/null
+++ b/.idea/.gitignore
@@ -1,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
--- /dev/null
+++ b/.idea/Test-IRC.iml
@@ -1,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="RUBY_MODULE" version="4">
+ <component name="ModuleRunConfigurationManager">
+ <shared />
+ </component>
+ <component name="NewModuleRootManager">
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/features" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
+ </content>
+ <orderEntry type="jdk" jdkName="ruby-3.2.1-p31" jdkType="RUBY_SDK" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="library" scope="PROVIDED" name="net-yail (v1.6.2, ruby-3.2.1-p31) [gem]" level="application" />
+ </component>
+</module>
\ No newline at end of file
--- /dev/null
+++ b/.idea/modules.xml
@@ -1,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/.idea/Test-IRC.iml" filepath="$PROJECT_DIR$/.idea/Test-IRC.iml" />
+ </modules>
+ </component>
+</project>
\ No newline at end of file
--- /dev/null
+++ b/.idea/vcs.xml
@@ -1,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="VcsDirectoryMappings">
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
+ </component>
+</project>
\ No newline at end of file
--- /dev/null
+++ b/Test_Multi_Threading.rb
@@ -1,0 +1,15 @@
+
+
+def Test
+ for i in 0..5 do
+ puts i;
+ # sleep(0.5)
+ end
+end
+
+t1 = Thread.new{Test()}
+t2 = Thread.new{Test()}
+
+t1.join
+
+t2.join
\ No newline at end of file
--- /dev/null
+++ b/test.rb
@@ -1,0 +1,44 @@
+require 'rubygems'
+require 'net/yail'
+
+irc = Net::YAIL.new(
+ :address => 'irc.ircnow.org',
+ :username => 'Moz_Bot',
+ :realname => 'Moz_Mozak',
+ :nicknames => ['bot1']
+)
+
+# Register a proc callback
+irc.on_welcome proc { |event| irc.join('#fpc') }
+
+# Register a block
+irc.on_invite { |event| irc.join(event.channel) }
+
+# Another way to register a block - note that this clobbers the prior callback
+irc.set_callback(:incoming_invite) { |event| irc.join(event.channel) }
+
+# Filter for all incoming pings so we can log them
+irc.hearing_ping {|event| $stderr.puts event.inspect}
+
+# Filter condition: if the message is a pm, ignore it by forcibly ending the event filter chain
+irc.hearing_message(:if => {:pm? => true}) do |event|
+ event.handle!
+end
+
+def Send(x)
+ for i in 1..10 do
+ x.msg('#fpc', i)
+ sleep(1);
+ end
+end
+
+irc.heard_msg(:if => {:message => "bah"}) do
+
+ t = Thread.new{Send(irc)}
+
+
+ #puts "bah dige"
+
+end
+
+irc.start_listening!
\ No newline at end of file