napa182 commented on a Page, Insult After You Kick  -  Dec 26, 2009

maybe get rid of the txt file and use a socket to get the insults...

this is nothing more then a fast mock up to give you an idea and maybe a starting point...

on $@*:text:/^!ikick\s(.+)/iS:#:{ if ($regml(1) ison # && $nick isop #) { if ($sock(kinsult)) .sockclose kinsult | .sockopen kinsult www.randominsults.net 80 | .sockmark kinsult # $regml(1) } }
on *:sockopen:kinsult: { sockwrite -nt $sockname GET / HTTP/1.1 | sockwrite -nt $sockname Host: $+(www.randominsults.net,$str($crlf,2)) }
on *:sockread:kinsult: {
  var %insult | sockread %insult
  if ($regex(%insult,/<i>(.+)<\/i>/)) { kick $sock(kinsult).mark $regml(1) | .sockclose kinsult } 
}
 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.