mIRC Meme generator Sock

Platform:  mIRC
Published  Apr 14, 2012
Updated  Apr 14, 2012
This is a meme socket generator.
Its a litle socket which grabs random memes from a website.

Example
<Aha2Y> !meme
<Bot> THEY SEE ME MASTICATIN, THEY SHOOTIN
<Aha2Y> !meme
<Bot> WE'VE SECRETLY REPLACED TROGDOR'S BEARD WITH A DUCK. LET'S SEE IF HE NOTICES...
<Aha2Y> !meme
<Bot> YOUR MORON IS NOT COOL
<Aha2Y> !meme
<Bot> 4CHANCAT IS A 4CHAN
;Meme generator socket by Aha2Y
;Do whatever you want with it.

on *:text:!meme:#:{
set -u5 %meme.chan $chan
sockClose meme
sockOpen meme api.automeme.net 80
}

on *:SockOpen:meme: {
sockWrite -nt meme GET /text HTTP/1.0
sockWrite -nt meme Host: api.automeme.net
sockWrite -nt meme $crlf
}

on *:SockRead:meme: {
var %read
sockRead -f %read
if (%read == $null) {
sockRead %read
tokenize 32 %read
msg %meme.chan $1-
}
}

Comments

Sign in to comment.
Wims   -  Apr 23, 2012
MaSOuD, because his condition is only true once, when the headers have been sent; with your condition, it would be true for any line of the headers

Also, to any people here, do not use /sockwrite -n if what you are sending ends with a $crlf (typically the last line of the headers you are sending)
 Respond  
napa182   -  Apr 16, 2012
nice work Aha2Y
another way it can be done, but then again there are many ways it can be done....

Code

 

again nice work you should think of putting a flood pro into it.
 Respond  
Lenooox   -  Apr 15, 2012
Looks good, I like :)
 Respond  
MaSOuD   -  Apr 15, 2012
Why not just using

Code

 
 Respond  
fraguk   -  Apr 14, 2012
Nice Aha2Y :)
 Respond  
Jethro   -  Apr 14, 2012
Interesting use of tokenize and repeated sockread commands to escape the header and multiple buffers from being shown in one setting...
 Respond  
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.