That High
Platform: mIRC
Published May 07, 2011
Updated May 18, 2011
Random "That High" grabber from
http://thathigh.com. Same thing as FML, MLIA etc, just stoner related. I didn't see one on here so I figured I'd post one up.
on $*:TEXT:/^([!.@])th$/Si:#:{
if (!%f) { inc -u3 %f | if ($sock(thathigh)) sockclose thathigh
sockopen thathigh www.thathigh.com 80
sockmark thathigh $iif($regml(1) = !,msg #,notice $nick)~$&
$+($chr(40) ThatHighâ„¢ $chr(41))
}
}
on *:SOCKOPEN:thathigh: {
sockwrite -nt $sockname GET /random/ HTTP/1.1
sockwrite -nt $sockname Host: $sock(thathigh).addr $+ $str($crlf,2)
}
on *:SOCKREAD:thathigh: {
if !($sockerr) {
var %thsock | sockread %thsock
if (*storylink* iswm %thsock) {
tokenize 32 %thsock
$sock(thathigh).mark $nohtml(%thsock) | sockclose thathigh
}
}
}
alias nohtml { return $regsubex($$1-,/^[^<]*>|<[^>]*>|<[^>]*$/g,) }
and random pages actually works... wrote one earlier
and just tested the above... it's working \o/