if (!$this->token) {
throw new \Exception('unable to find access token');
}
+ if ($this->token->hasExpired()) {
+ $this->token->refresh();
+ }
$this->connector = new Connector();
$this->connect();
if (!$this->ready) return;
if (time() - $this->last_contact < 60) return;
try {
- $this->sendIRCMessage(IRCMessage::ping());
+ $this->sendIRCMessage(IRCMessage::ping($this->nick));
} catch (\Exception $e) {
}
});