cvs: pear /Net_SmartIRC SmartIRC.php
| From: | Amir Mohammad Saied | Date: | Mon, 20 Aug 2007 23:51:18 +0000 |
| Subject: | cvs: pear /Net_SmartIRC SmartIRC.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-48479@lists.php.net to get a copy of this message | ||
amir Mon Aug 20 23:51:18 2007 UTC
Modified files:
/pear/Net_SmartIRC SmartIRC.php
Log:
A fix for #1950, now only for HEAD
http://cvs.php.net/viewvc.cgi/pear/Net_SmartIRC/SmartIRC.php?r1=1.91&r2=1.92&diff_format=u
Index: pear/Net_SmartIRC/SmartIRC.php
diff -u pear/Net_SmartIRC/SmartIRC.php:1.91 pear/Net_SmartIRC/SmartIRC.php:1.92
--- pear/Net_SmartIRC/SmartIRC.php:1.91 Sun Aug 12 08:29:57 2007
+++ pear/Net_SmartIRC/SmartIRC.php Mon Aug 20 23:51:18 2007
@@ -1,9 +1,9 @@
<?php
/**
- * $Id: SmartIRC.php,v 1.91 2007/08/12 08:29:57 amir Exp $
- * $Revision: 1.91 $
+ * $Id: SmartIRC.php,v 1.92 2007/08/20 23:51:18 amir Exp $
+ * $Revision: 1.92 $
* $Author: amir $
- * $Date: 2007/08/12 08:29:57 $
+ * $Date: 2007/08/20 23:51:18 $
*
* Net_SmartIRC
* This is a PHP class for communication with IRC networks,
@@ -44,7 +44,7 @@
*/
// ------- PHP code ----------
require_once 'SmartIRC/defines.php';
-define('SMARTIRC_VERSION', '1.1.0-dev ($Revision: 1.91 $)');
+define('SMARTIRC_VERSION', '1.1.0-dev ($Revision: 1.92 $)');
define('SMARTIRC_VERSIONSTRING', 'Net_SmartIRC '.SMARTIRC_VERSION);
/**
@@ -348,6 +348,12 @@
* @access private
*/
var $_connectionerror = false;
+
+ /**
+ * @var boolean
+ * @access private
+ */
+ var $_runasdaemon = false;
/**
@@ -407,7 +413,6 @@
ob_implicit_flush(true);
@set_time_limit(0);
- ignore_user_abort(true);
$this->_messagebuffer[SMARTIRC_CRITICAL] = array();
$this->_messagebuffer[SMARTIRC_HIGH] = array();
$this->_messagebuffer[SMARTIRC_MEDIUM] = array();
@@ -553,7 +558,7 @@
$this->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: Channel
syncing disabled', __FILE__, __LINE__);
}
}
-
+
/**
* Enables/disables user syncing.
*
@@ -808,6 +813,24 @@
{
$this->_modulepath = $path;
}
+
+ /**
+ * Sets wheter the script should be run as a daemon or not
+ * ( actually disables/enables ignore_user_abort() )
+ *
+ * @param boolean $boolean
+ * @return void
+ * @access public
+ */
+ function setRunAsDaemon($boolean)
+ {
+ if ($boolean === true) {
+ $this->_runasdaemon = true;
+ ingore_user_abort(true);
+ } else {
+ $this->_runasdaemon = false;
+ }
+ }
/**
* Starts the benchmark (sets the counters).