Originally Posted By: N3M3S1S
You may have to add certain functions so that it responds to that website's syntax.

Code:
on *:TEXT:!kings*:#: {
  %king.chan = $chan
  kingsofchaos $1-
}
alias kingsofchaos {
  ;add syntax to variable here
  %king.srch = $1-
  sockclose kings
  sockopen kings kingsofchaos.com 80
}
on *:SOCKOPEN:kings: {
  ;might have to add log-in as well
  sockwrite -n $sockname GET %king.srch HTTP/1.0
  sockwrite -n $sockname Host: www.kingsofchaos.com
  sockwrite -n $sockname Connection: Keep-Alive
  sockwrite -n $sockname Content-Type: text/html
  sockwrite -n $sockname $crlf
}
on *:SOCKREAD:kings: {
  sockread %kings

  ;may need to add $regex or $regml to sperate info from html.
  %king.num = 1

  ;change the number to appropriate number of information
  if (%king.num < 6) { 
    msg %king.chan %kings
    inc %king.num
  }
  elseif (%king.num >= 6) { sockclose king }
}
on *:SOCKCLOSE:king: { unset %king* }


Try something like that or improve upon this. I just threw it together as an example. One thing I noticed is that in order to do anything with that website you might have to have the bot log into the website through the sockets as well.


Well i get This Error:
<&Btxx>!kings dark222
<~Bot1> <html>
<~Bot1> <head><title>400 Bad Request</title></head>
<~Bot1> <body bgcolor="white">
<~Bot1> <center><h1>400 Bad Request</h1></center>
<~Bot1> <hr><center>nginx/0.6.32</center>
<~Bot1> </body>
<~Bot1> </html>

Last edited by lassyakjedi; 10/10/10 06:42 PM.