It vends!
Platform: mIRC
Published Jul 27, 2012
Updated Jul 27, 2012
My first public script and first time working with sockets.
Never. Again.
Anywho, this script pulls the text from itvends.com/vend.php and vends it to the channel
Bit thanks to my buddy KindOne who helped me through the tedious process of finding the bugs and fixing my derps
Enjoy
on *:TEXT:!vend:#: {
vend
set %vend-channel $chan
}
alias vend {
sockClose demo
sockOpen demo itvends.com 80
}
on *:SockOpen:demo: {
sockwrite -nt demo GET /vend.php HTTP/1.1
sockwrite -nt demo Host: itvends.com
sockwrite -nt demo $crlf
}
on *:SockRead:demo: {
var %read
sockRead %read
; TODO ... VOMIT ..
if (*HTTP/1.1* !iswm %read) {
if (*:* !iswm %read) {
if (%read !isnum) {
if ($len(%read) != 1) {
if (* * iswm %read) {
tokenize 32 %read
describe %vend-channel vends $1-
}
}
}
}
}
}