PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Networking » Net_SmartIRC » Bug #2309

Channel list message parsing error

Details

Submitted2004-09-10 11:18 UTC
Frommfdev at mftronic dot de
Assignedgarrettw
StatusClosed
PackageNet_SmartIRC
PHP Version4.3.2
OSWinXP
Roadmaps1.1.4

Comments

[2004-09-10 11:18 UTC] mfdev at mftronic dot de

Description:
------------
Concering Net_SmartIRC-0[1].5.5p1:

I want to simply query the number of users in a channel.

The relevant reply from the server however is not parsed correctly. As I'm not an IRC specialist, I do not know for sure whether it is not RFC conforming or a bug, but it's actually a big IRC network.

See other fields.

Reproduce code:
---------------
use "example2.php" included with SmartIRC

i changed server to "irc.quakenet.org"
and channel to #bliesnet (but should be same with any)

Expected result:
----------------
Print the number of users in the channel

Actual result:
--------------
Using debug mode, I get the following 3 *raw* messages as reply to 'getList':

:freddyshouse.uk.quakenet.org 321 Net_SmartIRC Channel :Users Name
:freddyshouse.uk.quakenet.org 322 Net_SmartIRC #bliesnet 3 :
:freddyshouse.uk.quakenet.org 323 Net_SmartIRC :End of /LIST

The parser however does not seem to recognize the second one, as expressed by this debug statement:
DEBUG_MESSAGEPARSER: ircdata nick: "" ident: "reddyshouse.uk.quakenet.or" host: "reddyshouse.uk.quakenet.org" type: "32768" from: "freddyshouse.uk.quakenet.org" channel: "" message: ""

Then it will return the third line as the result for the 'getList' method, which gives the follwing var_dump:

array(2) { [0]=> bool(false) [1]=> string(12) "End of /LIST" }

And obviously, I cannot extract the number of people in the channel (which is 3) from that.