示例#1
0
 /**
  * This function creates a bot with the specified name and network, and 
  * optionally joins a number of channels.
  * 
  * @param string $sName Nickname of the bot to create.
  * @param string $sNetwork Name of the network to connect with.
  * @param array $aChannels Array of channels to auto-join.
  */
 public function create($sName, $sNetwork, $aChannels = array())
 {
     $pBot = new Bot($sName);
     $pBot->setNetwork($sNetwork);
     $pBot->connect();
     foreach ((array) $aChannels as $sChannel) {
         $pBot->send('JOIN ' . $sChannel);
     }
 }