[PEAR-BUG] Bug #20476 [Asn->Csd]: JOIN not correct
[email protected] Thu, 8 Jan 2015 02:13:17 +0000 (GMT)
| Newsgroups | php.pear.bugs |
|---|---|
| Message-ID | <[email protected]> |
Edit report at https://pear.php.net/bugs/bug.php?id=20476&edit=1 ID: 20476 Updated by: [email protected] Reported By: sem dot schilder at gmail dot com Summary: JOIN not correct -Status: Assigned +Status: Closed Type: Bug Package: Net_SmartIRC Operating System: Mac OSX Yosemite Package Version: 1.1.5 PHP Version: 5.6.4 Assigned To: garrettw Roadmap Versions: New Comment: -Status: Assigned +Status: Closed This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. Previous Comments: ------------------------------------------------------------------------ [2014-12-30 10:55:39] garrettw -Status: Open +Status: Assigned -Assigned To: +Assigned To: garrettw Nevermind – I've found evidence elsewhere online that suggests adding the extra colon may be common practice for some IRCds, so I think it would be wise for me to add a workaround into the code to compensate for those non-standards-compliant servers. Piece of cake. ------------------------------------------------------------------------ [2014-12-30 10:39:43] garrettw That is strange. If I'm reading RFC2812 correctly, the JOIN message you should receive when another user joins your channel consists of: :<ident> JOIN <#channel> ...but yours has an extra colon in there, which is throwing the bot off: :<ident> JOIN :<#channel> In what situation is this occurring? Is this received right after the bot joins a channel, or is this when some other user joins, or what? ------------------------------------------------------------------------ [2014-12-29 23:24:22] xvilo Description: ------------ When a user joins the channel, the $data variable is not correct, the $data->channel is empty and the actual channel is in $data- >message... Test script: --------------- //action handler $irc->registerActionHandler(SMARTIRC_TYPE_JOIN, '.*?', $this, 'irc_join'), //function public function irc_karma($irc, $data){ var_dump($data); } Expected result: ---------------- object(Net_SmartIRC_data)#20 (11) { ["from"]=> string(25) "[email protected]" ["nick"]=> string(5) "xvilo" ["ident"]=> string(5) "xvilo" ["host"]=> string(13) "internet.user" ["channel"]=> string(4) "#DPF" ["params"]=> array(0) { } ["message"]=> NULL ["messageex"]=> array(1) { [0]=> NULL } ["type"]=> int(64) ["rawmessage"]=> string(37) ":[email protected] JOIN :#DPF" ["rawmessageex"]=> array(3) { [0]=> string(26) ":[email protected]" [1]=> string(4) "JOIN" [2]=> string(5) ":#DPF" } } Actual result: -------------- object(Net_SmartIRC_data)#20 (11) { ["from"]=> string(25) "[email protected]" ["nick"]=> string(5) "xvilo" ["ident"]=> string(5) "xvilo" ["host"]=> string(13) "internet.user" ["channel"]=> NULL ["params"]=> array(0) { } ["message"]=> string(4) "#DPF" ["messageex"]=> array(1) { [0]=> string(4) "#DPF" } ["type"]=> int(64) ["rawmessage"]=> string(37) ":[email protected] JOIN :#DPF" ["rawmessageex"]=> array(3) { [0]=> string(26) ":[email protected]" [1]=> string(4) "JOIN" [2]=> string(5) ":#DPF" } } ------------------------------------------------------------------------ -- Edit this bug report at https://pear.php.net/bugs/bug.php?id=20476&edit=1