Please Disable Ad-Block To View This Website.

If you block ads, this site can not survive!

Ads are very minimal for registered users. If you don't have an account please register now!

DOWNLOAD
 Full Scripts
 Addons
 Snippets
 DLLs
 MTS Themes
 Tutorials
 Misc.
 File Queue
 Download mIRC
INTERACT
 Screenshots
 Challenge
 Top Downloads
 Submit Form
 Forums

SEARCH
Site Search

FRIENDS
Link to us!
PhotoShelf

Home | Comments:
Average Rating:   10   Ruby4mIRC.dll v1.12 by argv
Description:
A great DLL to enable the use of the Ruby programming language in mIRC.

Submitted Review Author's Updates
For hardened Ruby coders and those new to the language, this DLL is fantastic. Ruby is a true OO language, and has a lot to recommend itself. Being able to utilize this in MSL is great. The DLL comes with documentation and examples, which all work perfectly. I must admit I’m quite new to Ruby, but the things I tried out all worked as expected.

As everything in Ruby is an “object”, accessing mIRC identifiers is no different. Just use mirc.me to return your nick for example.

Basically, this DLL is excellent. It makes a whole new world of possibilities available to the mIRC scripting community. Brilliant work argv.

Reviewed by mr_man
Changelog:

Ruby4mIRC version 1.12 released November 9th 2007.
-------------------------------------------------------------------
- Update for mIRC 6.32

Ruby4mIRC version 1.11 released November 9th 2007.
-------------------------------------------------------------------
- Fixed bug that kept the Ruby runtime dll loaded when other
Ruby dll/so libraries were required. The dll should now be properly
unloaded when called with /rbunload.


Ruby4mIRC version 1.1 released November 1st 2007.
-----------------------------------------------------------------
- Compatibility with mIRC 6.31
- More robust embedded script parser
- Added mirc[:varname] accessor method to get/set variables.

Visit http://kthx.net/clb/ruby4mirc for information on new features.

Screenshot:
No
Screenshot
Available

Comments:

  Mode:    Create New Post

GaMatecalSep 3, 2007 8:29PM
Rating:     10Why do I sense some *4*.dll releases so far... Did you release this because Python4mIRC was released :p

AndySep 4, 2007 7:18AM
Yea i'm making mIRC4mIRC.dll as we speak ;)

JigsySep 4, 2007 9:13AM
Try C4mIRC or ASM4mIRC. ;)


*EDIT*

Or HTML4mIRC, JavaScript4mIRC, Pascal4mIRC, VisualBasic4mIRC, etc, etc. xD

Text edited by author on Sep 11, 2007 @ 11:31AM


argvSep 4, 2007 2:35PM
Ruby has a RubyInline library which lets you drop into C code in Ruby as you would drop into Ruby in mIRC, so this is not that far away :)

You can go from mIRC -> Ruby -> C all within one script

JigsySep 4, 2007 9:40PM
Actually, someone on IRC mentioned TCL.

JigsySep 14, 2007 10:31AM
And what about PERL? :o

ProperNounSep 19, 2007 10:21AM
Already working on it... Just fiddling with the XS portion to feed commands back into mIRC and trying to decide if I should force all return values to scalar context or serialize data that's returned as hashes/arrays.
Addendum: Expect it around... October 1st. ...-ish.

Text edited by author on Sep 19, 2007 @ 10:25AM


JustariusSep 28, 2007 11:22PM
wait, am I reading this right? You're working on a perl4mIRC? I'll love you forever.

ProperNounNov 26, 2007 1:06PM
I got distracted and it's a bit late but I've uploaded Perl4mIRC. It's sitting in the File Queue.

Mirc indirMar 19, 2010 9:49PM
gibi Ruby içine mIRC düþüþ olur [quote = "argv"] Ruby, bu yüzden bu uzak deðil hangi Yakut C koduna damla size saðlayan bir RubyInline kütüphanesi var:)

Sen mIRC itibaren bir komut dosyasý [/ quote içinde -> Ruby -> C tüm gidebilir]

mirc indir
mircindir
sohbet
cikcik
sohbet
mirc indir
mircindir

GaMatecalSep 10, 2007 7:22PM
ASM4mIRC would be cool :O

GaMatecalSep 10, 2007 7:24PM
GIVE MEH NOW!!!

argvSep 4, 2007 2:48PM
Yes, I'll admit Python4mIRC was the inspiration here. The real reason I released though, was because I thought I could add functionality to a language bridge DLL that Janno's DLL does not have even if you take the whole language difference out of the picture. Namely, Ruby4mIRC can evaluate things like `mirc.nick`, or `mirc.fulladdress` inside embedded code in an ON TEXT event. In Janno's dll, you would have to figure out a sneaky way to pass values (ugly global variables) into the embedded Python block because $fulladdress (or any event specific identifiers) will not evaluate from SendMessage calls, making it slightly less convenient. Ruby also formats more easily alongside mIRC's code because you can use { } to open blocks for the most part. In Python you have to get friendly with ctrl-i to force the tab character in your code, which is less convenient as well. This is not really Janno's fault, but simply a drawback of using Python inside mIRC script. All in all, I think language aside, the DLL contributes features not present in any other DLL; the fact that I chose Ruby was only a tribute to my favourite language :)

JannoSep 4, 2007 3:46PM
I'm curious: how did you manage evaluate event specific identifiers? I've gone through your code but since I'm c-ophob I couldn't really find anything that would explain this feature.
PS: I'm trying to work around the indentation problem at this very moment and I might allow the usage of { } to avoid ctrl+i.

argvSep 4, 2007 7:39PM
Like sat's spaces.dll I reversed engineered parts of mIRC to get direct access to the script parser. To follow sat's precedent, I decided it would be best if I also did not release the source for the parts that I had to reverse engineer. This is why you probably did not find the code in question. You can read more of the legal implications here.

Ruby4mIRC will compile fully with the source code provided in the package, but, as mentioned in the README.txt under the licensing section, the parts of the code that could potentially violate mIRC's EULA have been swapped out with function stubs. Again, the DLL is compileable and functional without the reverse engineering code and gracefully falls back to SendMessage-- but you will not be able to use it in "supported" mode, ie. the mode that makes direct use of mIRC's script parser.

I've made a feature suggestion on the mIRC forums to allow SendMessage to properly parse event specific identifiers when called from an event, but there are plenty of complications in implementing that properly.

*Edit: PS. You can look at how my dll solves indentation problems for if blocks in ruby, which don't use { }, simply add a # { or # } comment to the end of the line and this will trick mIRC into thinking there is an opening or closing brace to be handled

Text edited by author on Sep 4, 2007 @ 7:41PM


zylorNov 10, 2007 10:39AM
* Loaded script 'C:\nn4\ruby4mirc\ruby.mrc'
* Running /testrb to see if Ruby works:
* /dll: unable to open 'C:\nn4\ruby4mirc\ruby4mirc.dll' (line 15, ruby.mrc)

Text edited by author on Nov 10, 2007 @ 10:40AM


ZorgonSep 9, 2007 3:19PM
I loaded up the script, and got this error message:
* Running /testrb to see if Ruby works:
* /dll: unable to open file 'C:\Program' (line 15, ruby.mrc)

I changed line 15 to place quotes around the path, and got this error message:
* Running /testrb to see if Ruby works:
* /dll: unable to open file 'C:\Program Files\mIRC\ruby4mirc\ruby.dll' (line 15, ruby.mrc)

And I assure you, the DLL is there.

Edit: While I do have Ruby installed, it seems as though I still needed to have that DLL in my mIRC install folder.. I moved it, and it worked. Perhaps it just isn't accessing things correctly on my computer, or I should've restarted before trying.

Text edited by author on Sep 11, 2007 @ 4:20PM


argvNov 9, 2007 1:48AM
This is fixed in v1.1 by the way

ToXedVirusNov 4, 2007 7:31AM
Rating:     10The dll is just great - its a true bridge between mirc and ruby.
I tried to play around with this dll, but i still miss some functionality. Once you run mirc and this dll a ruby enviroment is created.
And all over the time, when you are using mirc, the enviroment keeps the same, if you require some ruby script, the script stays loaded in the enviroment and you can't reload it. At the first look this seems to be a great feature (it doesn't have to process all these scripts all the time) but on the other side its very hard to write an own script file with self defined classes (since i like to experiment a lot, "change, run, change, run ....").
So i would love to see a feature, which lets you reset the ruby enviroment!

Text edited by author on Nov 5, 2007 @ 6:46PM


argvNov 4, 2007 5:55PM
You can reload the ruby environment by unloading the dll and then calling any ruby command again. Type /dll -u $rbdll, or use the /rbunload convenience alias

ToXedVirusNov 5, 2007 6:44PM
Ok, it works now, but i have to /rbunload and /dll -u $rbdll to get it working, thanks for the help i love this dll! :)

Text edited by author on Nov 5, 2007 @ 6:46PM


ToXedVirusNov 8, 2007 12:49PM
here we go, this won't work:

alias ruby_try { 
  rbunload
  dll -u $rbdll
  if $($has_ruby,2) {
    require 'sys/unload.rb'
    require 'yaml'
  }
}

the unload.rb looks like this: puts "ASD"
but if you load the yaml file, there is no way reseting the ruby enviroment
once i require 'yaml', i just cant reset it anymore!

argvNov 9, 2007 1:48AM
You're absolutely right. The issue seems to be related to http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/43075

I just applied a patch that should properly unload any extra dlls loaded by Ruby. I'll be releasing a maintenance fix either Friday afternoon or Saturday along with one for my Tcl4mIRC dll.

Thanks :)

EderSep 7, 2007 2:41AM
Rating:     10Oops this is another python vs ruby chapter, Nice implementation btw.

argvSep 7, 2007 8:32PM
quote:
Eder said:

Oops this is another python vs ruby chapter
A friendly one :)
quote:
Eder said:

Nice implementation btw.
Thanks!

starGamingSep 6, 2007 12:08PM
Would you mind checking your PMs, argv? ;)

SparkleSep 4, 2007 6:45PM
Rating:     10PHP4mIRC please <3



Create New Post

You must be logged in to post messages.