Menu

Stopping SmartIRC after one message send

Help
2004-01-14
2004-01-15
  • Nobody/Anonymous

    Hello,

    I try to use SmartIRC to paste a message in a channel and then quit. But this won't work as requested.

    I Use following Code:
    $irc =& new Net_SmartIRC();
    $irc->connect( 'testserver' '6667');
    $irc->login( 'test, 'Test User' );
    $irc->join( array("#irc-test" );
    $irc->setChannelSyncing(TRUE);
    $irc->message(SMARTIRC_TYPE_CHANNEL, "#irc-test", "say hello");
    $irc->listenFor(SMARTIRC_TYPE_CHANNEL);
    $irc->disconnect();

    This work but listenFor() wait for the next message to apear in the channel. If I use SMARTIRC_TYPE_JOIN then nothing will appear on the channel and the client disconnect clear.

    What can I improve to or change that only the message will be send and then rapidly quit, becaause my site hung until the IRC Client has not disconnect?

    Thx in forward.

    Cheers
    -Peter

     
    • Anonymous

      Anonymous - 2004-01-14

      Perhaps  $irc->quit()

      $irc =& new Net_SmartIRC();
      $irc->connect( 'testserver' '6667');
      $irc->login( 'test, 'Test User' );
      $irc->join( array("#irc-test" );
      $irc->setChannelSyncing(TRUE);
      $irc->message(SMARTIRC_TYPE_CHANNEL, "#irc-test", "say hello");
      $irc->quit();
      //$irc->listenFor(SMARTIRC_TYPE_CHANNEL);
      $irc->disconnect();

       
    • Nobody/Anonymous

      No this doesn't solve my problem.
      The quit closes the connection but nothing will appear on the channel.

      Any other suggestions?

       

Log in to post a comment.