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-
}
}
}
}
}
}

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.