Fixed the patch.Changed to proper values in db.sql.

This commit is contained in:
DariusIII
2014-04-21 22:17:08 +02:00
parent 4560bebafc
commit b486b6add4
17 changed files with 406 additions and 6233 deletions
-36
View File
@@ -1,36 +0,0 @@
<?php
class Net_SmartIRC_module_PingFix
{
public $name = 'PingFix';
public $version = '1.0';
public $description = 'An active-pinging system to keep the bot from dropping the connection';
public $author = 'Garrett W.';
public $license = 'LGPL';
private $irc;
private $thid;
function __construct(&$irc)
{
$this->irc = $irc;
$this->thid = $this->irc->registerTimehandler(
$this->irc->_rxtimeout / 8 * 1000, $this, 'pingCheck'
);
}
function __destruct()
{
$this->irc->unregisterTimeid($this->thid);
}
function pingCheck()
{
if (time() - $this->irc->_lastrx > $this->irc->_rxtimeout) {
$this->irc->reconnect();
$this->irc->_lastrx = time();
} elseif (time() - $this->irc->_lastrx > $this->irc->_rxtimeout / 3) {
$this->irc->_send('PING ' . $this->irc->_address, SMARTIRC_CRITICAL);
}
}
}