didou           Thu Jan 29 05:30:24 2004 EDT

  Added files:                 
    /phpdoc/en/reference/ircg/functions ircg-list.xml 
  Log:
  first documentation, by David Costa
  

http://cvs.php.net/co.php/phpdoc/en/reference/ircg/functions/ircg-list.xml?r=1.1&p=1
Index: phpdoc/en/reference/ircg/functions/ircg-list.xml
+++ phpdoc/en/reference/ircg/functions/ircg-list.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.ircg-list">
   <refnamediv>
    <refname>ircg_list</refname>
    <refpurpose>List topic/user count of channel(s)</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
    <methodsynopsis>
     <type>bool</type> <methodname>ircg_list</methodname>
     <methodparam><type>resource</type><parameter>connection</parameter></methodparam>
     <methodparam><type>string</type><parameter>channel</parameter></methodparam>
    </methodsynopsis>
    <simpara>
     <function>ircg_list</function> will request a list of users in the
     <parameter>channel</parameter>. The answer is sent to the output 
     defined by <function>ircg_set_file</function> or 
     <function>ircg_set_current</function>. 
     &return.success;
    </simpara>
    <para>
     <example>
      <title><function>ircg_list</function> example</title>
      <programlisting role="php">
<![CDATA[
<?php

// connect to server
$id = ircg_pconnect($nickname, $ip, $port);

// set to output to a file
ircg_set_file($id, 'irc_output.html');

// try to join a channel
if (!ircg_join($id, $channel)) {
    echo "Cannot /join $channel<br />";
}

// send list command
ircg_list($id, $channel);

// wait for output to arrive
sleep(5);

// disconnect
ircg_disconnect($id,'Bye World');

// output everything
readfile('irc_output.html');

?>
]]>
      </programlisting>
      <para>
       This example will output something similar to:
      </para>
      <screen>
<![CDATA[
..
Channel #channel has n users and the topic is 'Topic'
End of LIST
..
]]>
      </screen>
     </example>
    </para>
    <simpara>
     See also: <function>ircg_set_file</function>, 
     <function>ircg_set_current</function>, and
     <function>ircg_who</function>.
    </simpara>
   </refsect1>
  </refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

Reply via email to