tubular

PHP-BASIC bot

Mar 17th, 2011
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. <?php //optimization of http://pastebin.com/xyEWdk7C
  2. $tosend = '';
  3. $s = fsockopen('nucleus.kafuka.org', 6667, $errnum, $errstr, 30);
  4. makebot:
  5. if(!$tosend)
  6. $tosend = "USER phasic phasic phasic :Kyurel's bot\r\nNICK PHasic";
  7. $t = fgets($s);
  8. $ping = substr($t, 0, 4);
  9. if($ping == 'PING')
  10. $tosend = 'PONG'.substr($t, 4);
  11. if($tosend == 'nothing')
  12. goto makebot;
  13. fputs($s, $tosend . chr(10) . chr(13));
  14. $tosend = 'nothing';
  15. goto makebot;
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment