Downloading File
Filename: Bash.org Random Quote
; 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 } } } }
Related Files
by Warrior124
by Jonesy44
by jonesy44