00001 00002 <?php 00003 00004 require('class.maxIrcBot.inc'); 00005 00006 $bot = new maxIrcBot('irc.rn.brasnet.org', 6667); 00007 $bot->setNick('mazzirq'); // define o nick - it sets the nick 00008 $bot->setUser('mazzirq'); // define o usuário - it sets the user 00009 $bot->setPass('*******'); 00010 // 00011 $NickServ = &$bot->plugin('NickServ'); // it loads the plugin 00012 $NickServ->identify('******'); 00013 // 00014 $bot->joinChannel('#maxIrcBot'); // entre no canal - it go in the channel 00015 $bot->setMaster('kn1ght'); // indica o administrador do bot no canal - it set the master 00016 $bot->replyTo('#maxIrcBot'); // local de resposta aos comandos do administrador - the bot replies to the channel 00017 $bot->createCommand('QUIT', 'calma'); // cria comando e a resposta ao comando do administrador - it creates a command for reply of the bot 00018 //$bot->leaveChannel('#maxIrcBot', 'tchau!'); // deixa o canal 00019 // $op = &$bot->plugin('IamOP'); // carrega o plugin 00020 // $op->setTopic('Seja livre', '#php'); // executa método do plugin 00021 $bot->close(); // finaliza 00022 00023 $nicks = $bot->getNamesByChannel('#maxIrcBot'); 00024 00025 print_r($nicks); 00026 00027 ?>
1.4.7