Acronym Finder
Platform: mIRC
Published Jun 17, 2008
Updated Dec 17, 2008
So this is just a little acronym finder. You right click and hit "Acronym Finder" to open up the dialog, and you type in the acronym and click search. For example, you type in "BBL" and hit the search button.
Here's a screen:
Enjoy
;~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
; Acronym Finder ;
; Made by MountainDew ;
; IRC.UnderNet.org ~ #Hawkee.com ;
; IRC.SwiftIRC.net ~ #mSL ;
;~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
menu * {
Acronym Finder: acronyms
}
alias noresults noop $input(Sorry $+ $chr(44) no results found.,io,No results)
alias acronyms dialog $iif($dialog(acronyms),-v,-m) acronyms acronyms
on *:text:!acronym *:#:{
if (!$2) .notice $nick Syntax: /acronym [acronym]
elseif ($sock(acro)) .notice $nick Sorry, there's already a request in progress.
sockopen acro silmaril.ie 80
sockmark acro $2
set %acro.msg .notice $nick
}
dialog acronyms {
title "Acronym Finder"
size -1 -1 87 100
option dbu
button "OK", 1, 31 89 23 9, ok cancel
text "Acronym Finder", 2, 23 3 40 8, center
edit "", 3, 6 20 45 10
button "Search", 4, 54 20 27 10, disable
list 5, 6 42 75 42, size hsbar vsbar
box "Definitions", 6, 3 34 81 53
box "Acronym", 7, 3 12 81 21
}
on *:dialog:acronyms:*:*:{
if ($devent == edit && $did == 3) {
did $iif($did($dname,3) != $chr(32) && $v1,-e,-b) $dname 4
did -r $dname 5
}
if ($devent == sclick && $did == 4) {
if ($sock(acro)) sockclose acro
did -b $dname 4
did -r $dname 5
sockopen acro silmaril.ie 80
sockmark acro $gettok($did($dname,3),1,32)
set %acro.msg did -a acronyms 5
}
}
on *:sockopen:acro:{
sockwrite -nt $sockname GET /cgi-bin/uncgi/acronyms/?terms= $+ $sock($sockname).mark HTTP/1.1
sockwrite -nt $sockname Host: silmaril.ie
sockwrite -nt $sockname $crlf
}
on *:sockread:acro:{
var %x
sockread %x
if ($regex(%x,/<dd><b><a title=".+">(.+)<\/a><\/b>/i)) {
%acro.msg $regml(1)
}
if (Found: isin %x) {
if ($dialog(acronyms)) {
did -e acronyms 4
did -z acronyms 5
}
if (!$mid(%x,11,1)) .timernoresults 1 0 noresults
sockclose $sockname
unset %acro.msg
}
}