Yes! i know, it's been done before. But i perfer this version for a few of reasons;
**Version 1.00*** It actually gives the quote, not a link
COMMANDS
/bash [quote-num] [#channel]
[!@.'`]bash [quote-num]
SCREENSHOT
; Bash.org Script by Jonesy44 ========;
; irc.chatscape.net // #chatscape ====;
; Version 1.10 =======================;
; ====================================;
; DO NOT EDIT ANYTHING IN THIS FILE ==;
; UNLESS YOU KNOW WHAT YOU'RE DOING ==;
; ====================================;
on $*:TEXT:/[!@\.'`]bash*/:#: {
if (!$sock(bash)) { bash $iif($1 isnum,$1 $chan,$chan) }
else { msg $chan 4Bash.org Socket in use, Please wait.. }
}
alias bash {
if ($1) {
if ($me ison $1) {
set %bash.chan $1
}
elseif ($1 isnum) {
set %bash.q $1
if ($me ison $2) {
set %bash.chan $2
}
}
}
else {
unset %bash.*
}
$iif(%bash.chan,msg %bash.chan,echo -a) 4Bash.org Getting $iif(!%bash.q,a random,) quote $iif(%bash.q,$chr(35) $+ %bash.q,) from bash.org, Please wait..
if ($sock(bash)) {
sockclose bash
}
sockopen bash www.bash.org 80
}
alias bash.removetags {
noop $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%bash.n)
var %y = $remove($replace(%bash.n,<,<,>,>,","), )
unset %bash.n
return %y
}
on *:SOCKOPEN:bash: {
sockwrite -nt $sockname GET $iif(!%bash.q,/?random,$+(/?,%bash.q)) HTTP/1.1
sockwrite -nt $sockname Host: www.bash.org
sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:bash: {
var %x
sockread %x
if (<p class="quote">* iswm %x) {
if ($right(%x,4) == </p>) {
$iif(%bash.chan,msg %bash.chan,echo -a) 4Bash.org - $gettok($bash.removetags(%x),1,32) Quote: $remove($gettok($bash.removetags(%x),3-,32),[X])
sockclose bash
unset %bash.*
}
else {
if (!%bash.q) {
sockclose bash
sockopen bash www.bash.org 80
}
else {
$iif(%bash.chan,msg %bash.chan,echo -a) 4Bash.org Sorry, Quote %bash.q is not a One-Liner
}
}
}
}
Mountaindew: thanks for the help; here's the product, so far! :D http://www.hawkee.com/profile/img/2454/
Thank you MD!! YOU ARE A GOD!! how did you know that may i ask? i got the return log WWW-Authentication etcetc but had no idea how to get round it XD
There was already an mIRC script: http://forum.utorrent.com/viewtopic.php?id=15387&p=1
But it looks like it could be made a lot better.
Jonesy: uTorrent Web UI API
So you'd socket to http://[IP]:[PORT]/gui/?list=1
And to authenticate:
sockwrite -nt $sockname Authorization: Basic $encode(USER:PASS,m)
I was gonna make one once but I just decided it'd be easier to just open uTorrent itself ;)