Bug #2309 [Asn->Csd]: Channel list message parsing error
| From: | garrettw87 at gmail dot com | Date: | Tue, 28 Oct 2014 19:45:40 +0000 |
| Subject: | Bug #2309 [Asn->Csd]: Channel list message parsing error | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-11106@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=2309&edit=1
ID: 2309
Updated by: garrettw87@gmail.com
Reported By: mfdev at mftronic dot de
Summary: Channel list message parsing error
-Status: Assigned
+Status: Closed
Type: Bug
Package: Net_SmartIRC
Operating System: WinXP
PHP Version: 4.3.2
Assigned To: garrettw
Roadmap Versions:
New Comment:
-Status: Assigned
+Status: Closed
On second thought, I'd better not. That could break more things than it
fixes. Just sniff the $data->message content to see if it says "End of
/LIST" or something.
Previous Comments:
------------------------------------------------------------------------
[2014-10-27 06:25:38] garrettw
-Status: Bogus
+Status: Assigned
-Assigned To:
+Assigned To: garrettw
This has been partially fixed.
You can now get that number without having to parse a raw message --
it's already in
its own variable. Look in $ircdata->params[2] when you get a message of
the type
SMARTIRC_TYPE_LIST.
What I need to do now is make that "End of /LIST." message be discarded,
since you
can't really use it for anything. Raw type SMARTIRC_RPL_LISTEND is
currently
translated to a message type of SMARTIRC_TYPE_LIST, but I'll change it
to be
SMARTIRC_TYPE_NONRELEVANT.
------------------------------------------------------------------------
[2004-12-20 10:36:54] meebey
as the last comment says, it's not a bug, it's by design
------------------------------------------------------------------------
[2004-09-22 06:03:06] meebey
this is a normal behavoir, its currently not possible to use
$data->message for channel usercount replies, you need to check
$data->rawmessage, 0.5.6 will provide a method allowing ListenFor() to
return the whole data object instead just the message part (which does
not contain all data, like the usercount)
------------------------------------------------------------------------
[2004-09-10 07:18:13] 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.
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=2309&edit=1