Alias caps { Return $Upper($Left($1,1)) $+ $Right($1,-1)) } on $*:TEXT:/^[@!]urban/Si:#:{ if ($istok(#rsuno #rstrivia #mirc #rune-server #trivia #uber,#,32)) { halt } else { sockclose urban set -u10 %word $replace($2-,$chr(32),$chr(43)) set -u10 %output.urban $iif($left($1,1) == @, msg $chan, .notice $nick) sockopen urban www.urbandictionary.com 80 else { .notice $nick Syntax: !/@urban Word } } } on *:SOCKOPEN:Urban: { sockwrite -nt $sockname GET $+(/define.php?term=,%word) HTTP/1.1 sockwrite -nt $sockname Host: www.urbandictionary.com sockwrite -nt $sockname $crlf } on *:SOCKREAD:Urban: { if ($sockerr) { msg $chan ERROR: $sockname $+ . Code: $sockerr } else { var %sockread sockread %sockread if (*

*

iswm %sockread) || (*

*
iswm %sockread) { var %definition $remove(%sockread,

,

,
) output.urban 14»07U14rban 7D14efiniton 07F14or: $replace($caps(%word),$chr(43),$chr(32)) 07- $regsubex($replace(%definition,",",&,&),/<.*?>/g,) $+ 14« unset %urban.* Sockclose Urban } elseif (*isn't defined* iswm %sockread) { %output.urban 07T14he word you were looking for was not found07. 07»1440407« B14itch07. unset %urban.* sockclose urban } } } on *SOCKCLOSE:urban:{ unset %word unset %output.urban socklose $sockname } on *:input:#:{ if ($1 == !urban) || ($1 == @urban) { sockclose urban set -u15 %word $replace($2-,$chr(32),$chr(43)) set -u15 %output.urban $iif($left($1,1) == @, msg $chan, .notice $nick) sockopen urban www.urbandictionary.com 80 } }