public $channels = null;
public $transporttype = null;
public $encoding = null;
+ public $pinginterval = null;
public $regcheck = null;
public $unregregexp = null;
if (!isset($this->encoding)) {
$this->encoding = 'UTF-8';
}
+ if (!isset($this->pinginterval)) {
+ $this->pinginterval = 120;
+ }
if (!isset($this->regcheck)) {
$this->regcheck = true;
channels: Channels for bot to idle in
transporttype: Set to 'ssl' to enable SSL
encoding: Set to change encoding
+pinginterval: Set to change the number of seconds between pings (helps keep the connection open)
+ Defaults to 120 seconds
regcheck: Check user's nicknames are registered, enabled by default, set to false to disable
regregexp: Override existing regexp matching response from NickServ if nick checked is registered.
Must contain a capturing group catching the nick
if ($this->messageWaiting) {
return 1;
} else {
- return 120;
+ return $this->plugin->pinginterval;
}
}
*/
public function idle() {
// Send a ping if necessary
- if (empty($this->lastPing) || time() - $this->lastPing > 120) {
+ if (empty($this->lastPing) || time() - $this->lastPing > $this->plugin->pinginterval) {
$this->sendPing();
}