Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.1.14

Bug #20972 reconnect & usermode
Submitted: 2015-10-25 23:58 UTC
From: glen Assigned: garrettw
Status: Closed Package: Net_SmartIRC (version 1.1.8)
PHP Version: 5.5.30 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2015-10-25 23:58 UTC] glen (Elan Ruusamäe)
Description: ------------ login() wants usermode as integer, but $this->_usermode is real user mode flags ("+ixn" in this example) seems that with reconnect, it takes usermode from irc server, which is chars, but smartirc likes only integers: Oct 25 21:52:01 SmartIRC.php(1260) DEBUG_NOTICE: login() usermode (+ixn) is not valid, will use 0 instead reconnect() method has: $this->login($this->_nick, $this->_realname, $this- >_usermode, $this->_username, $this->_password );

Comments

 [2015-11-10 20:10 UTC] garrettw (Garrett Whitehorn)
IRC servers require a numeric usermode to be sent with the USER command at the beginning of the connection, and that numeric can only set +i, +w, both, or neither. Possible values are as follows: 0=neither 4=+w 8=+i 12=+iw However, after that is sent, SmartIRC doesn't want to assume the mode is set a certain way without the server replying to tell it what modes are set. And when the server replies, it sends characters – which are then saved into $this->_usermode. So I guess what I'll do is parse any existing _usermode value in the login() method to generate a numeric just for that method to use. Standby.
 [2015-11-10 23:45 UTC] garrettw (Garrett Whitehorn)
-Status: Open +Status: Closed -Assigned To: +Assigned To: garrettw
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.