cvs: pear /Net_SmartIRC SmartIRC.php

From: Date: Mon, 09 Jun 2003 13:50:56 +0000
Subject: cvs: pear /Net_SmartIRC SmartIRC.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-10804@lists.php.net to get a copy of this message
meebey Mon Jun 9 09:50:56 2003 EDT Modified files: /pear/Net_SmartIRC SmartIRC.php Log: - added placeholder methods _checkPHPVersion(). - fixed wrong filename handling for logging. - fixed reconnect() bug, it sent the joins right after connect(), and tried to join a channel without a name. - changed fsocks back to use static _receivedelay, because fsocks has no select() feature. - _loggedin is now set to false when the socket is dead. Index: pear/Net_SmartIRC/SmartIRC.php diff -u pear/Net_SmartIRC/SmartIRC.php:1.40 pear/Net_SmartIRC/SmartIRC.php:1.41 --- pear/Net_SmartIRC/SmartIRC.php:1.40 Mon Jun 9 08:22:39 2003 +++ pear/Net_SmartIRC/SmartIRC.php Mon Jun 9 09:50:56 2003 @@ -1,9 +1,9 @@ <?php /** - * $Id: SmartIRC.php,v 1.40 2003/06/09 12:22:39 meebey Exp $ - * $Revision: 1.40 $ + * $Id: SmartIRC.php,v 1.41 2003/06/09 13:50:56 meebey Exp $ + * $Revision: 1.41 $ * $Author: meebey $ - * $Date: 2003/06/09 12:22:39 $ + * $Date: 2003/06/09 13:50:56 $ * * Net_SmartIRC * Communication for PHP with IRC networks @@ -369,6 +369,9 @@ */ function Net_SmartIRC() { + // precheck + $this->_checkPHPVersion(); + ob_implicit_flush(true); @set_time_limit(0); ignore_user_abort(true); @@ -818,7 +821,7 @@ if ($file !== null && $line !== null) { - $file = substr($file, strrpos($file, '/')+1); + $file = basename($file); $entry = $file.'('.$line.') '.$entry; } @@ -1006,7 +1009,7 @@ $this->log(SMARTIRC_DEBUG_CONNECTION, 'DEBUG_CONNECTION: reconnecting...', __FILE__, __LINE__); // remember in which channels we are joined - $channels = array(array()); + $channels = array(); foreach ($this->_channels as $value) { if (empty($value->key)) { $channels[] = array('name' => $value->name); @@ -1863,7 +1866,7 @@ function _nicknameinuse() { $newnickname = substr($this->_nick, 0, 5).rand(0, 999); - $this->changeNick($newnickname); + $this->changeNick($newnickname, SMARTIRC_CRITICAL); $this->_nick = $newnickname; } @@ -2051,7 +2054,7 @@ $rawdata = null; } } else { - usleep($timeout*1000); + usleep($this->_receivedelay*1000); $rawdata = @fread($this->_socket, 10240); } @@ -2405,6 +2408,7 @@ return true; } else { $this->_state = false; + $this->_loggedin = false; return false; } } @@ -2687,6 +2691,9 @@ { } + function _checkPHPVersion() + { + } // </private methods> function isError($object) {

« previous php.pear.cvs (#10804) next »