OK, so you can access E2 quickly and easily from mIRC now using the other WU at this node. Nifty keen. That is certainly a handy function and I use it myself for googling. But Everything is a community, so where's the sharing? Where's the love? Wouldn't it be nice if someone could drop an E2 link into the IRC channel and you could just click on it to go there. By now you're most probably moist with excitement, so I'll stop hyping it.

You will need the following setup:

  • mIRC - not sure what version is the minimum, but 5.9 onwards should be OK.
  • Events need to be enabled - Tools > Remote > Listen > Events (should be ticked)
  • Browser specified - This might not be necessary in all cases, but on versions lower than 6, there is a setting (File > Options...) to allow you to specify your default browser. Set it.

Paste the following piece of script into mIRC's "remote" section (Tools > Remote...):


;;;;;;;;;# E2LinkGrabber #;;;;;;;;;;

on ^1:HOTLINK:*:#:{
var %overword = $remove($1,[,])
if (*>*[* $+ %overword $+ *]* iswm $hotline) return
halt
}

on 1:HOTLINK:*:*: {
var %E2LinkString = $hotline
;;;;;; Lop off the timestamp first
if ([*]* iswm $hotline) {
var %E2LinkString = $right(%E2LinkString,-7)
}
var %E2LinkString = $wildtok(%E2LinkString, *, 2, 91)
var %E2LinkString = $wildtok(%E2LinkString, *, 1, 93)
;echo click - $hotline , %E2LinkString, $chan
E2LinkClick $chan %E2LinkString
}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Then paste this piece of script into the "aliases" section: (Tools > Aliases...)


;;;;;;;;;;;;;;;;;;;;Hot up E2 link;;;;;;;;;;;;;;;;;;;;;;

/E2LinkClick {
; i'm proud of this filthy little workaround
;(+2B) ("22) (&26) (;3B) (?3F)
var %2B % $+ 2B
var %22 % $+ 22
var %26 % $+ 26
var %3B % $+ 3B
; doesn't seem strictly necessary, because all e2
; links have ?'s before the parms, but it can't hurt:
var %3F % $+ 3F
; prizes for anyone that follows this splurge.
; writing it in HTML was even more fun :)
var %E2SearchParms = $replace($2- ,+,%2B,$chr(32),+,",%22,>,%26 $+ gt%3B,<,%26 $+ lt%3B,?,%3F,&,%26)
var %E2QueryString = http://www.everything2.com/?node= $+ %E2SearchParms
msg $1 <-=click=->
; you can pick your own browser by putting the full path
; to it in doublequotes between "run" and "%E2QueryString"
run %E2QueryString
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Woo hoo! From now on any text that looks like [steganography in e2] (ouch, shameless nodevertising) will generate a beautiful pointy hand when you mouseover it. Click on it and the E2 page will open up in your browser. Joy!

Use a semicolon to comment out the "msg" line if you don't want the script to say <-=click=-> to the channel when you click on it.


Clearly this may not work and may break things, so the usual warnings apply. If you use an exotic timestamping method then it may break. Also it will probably make a balls-up of multiple links on one line. I really should get to grips with regular expressions. Feel free to send me corrections/improvements.



UPDATES:

2002.04.27 - Along with some kind praise, booyaa had this suggestion for people having difficulty with getting the script running:

if they get this error.. "* /run: command locked in options dialog (line 8, aliases.ini)" they should go into tools- >general->lock and uncheck "/ run" in disable commands.
FYI: The run command allows mIRC to launch external programs and open files (and also URLs), so in this case it's necessary to enable it so that mIRC can open your browser reliably. It doesn't pose any security risk to leave it enabled unless you specifically add a script that lets people /run a dangerous program.

2002.11.19 - If you liked this WU you may also like... c-dub's smashing new LIRC E2 node alias for the RISC OS client.

2003.01.27 - c-dub spotted a bug in my script that causes it to cock up links with doublequotes in them. Fixed!