Jethro commented on a Page, Channel Greeting Console  -  Dec 16, 2010

ActiveX, this is a funny, promiscuous talking bot I made utilizing socket for someone's request:

on *:text:*:*:bottalk $1-
on *:action:*:*:bottalk $1-
on *:notice:*:*:bottalk $1-
alias -l bottalk {
  if $sock(bot) { sockclose bot }
  sockopen bot www.chat-bot.com 80
  sockmark bot $replace($strip($1-),$chr(32),+) $iif($event = text,.msg,$&
    $iif($event = action,.describe,$iif($event = notice,.notice))) $iif(#,#,$nick)
}
on *:sockread:bot:{
  var %bot | sockread %bot
  if $regex(%bot,/value="(.*)"\s>/) {
    $token($sock(bot).mark,2-,32) $regml(1)
    sockclose bot
  }
}
on *:sockopen:bot:{
  var %x onceki=&cevabi=Can+you+tell+me+something+interesting%3F&konuk=
  var %bot1 $+(%x,$token($sock(bot).mark,1,32))
  var %bot sockwrite -nt bot
  %bot POST /index.php HTTP/1.1
  %bot Host: $sock(bot).addr
  %bot Content-Type: application/x-www-form-urlencoded
  %bot Content-Length: $len(%bot1)
  %bot $crlf $+ %bot1
}

Whenever someone sends a text, action or notice in the channel or PM, the bot (the client that runs the code) will respond with a random say. Be warned that the say may be a bit sexual, so use with caution.

 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.