php-doc-en/reference/ircg/functions/ircg-list.xml
Yannick Torres bd5fa7a3c6 WS
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@165958 c90b9560-bf6c-de11-be94-00142212c4b1
2004-08-10 20:31:35 +00:00

95 lines
2.3 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<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
-->