public function onPrivateMessage(Bucket $bucket) { $data = $bucket->getData(); $owner = $this->getConfiguration()->get('configuration.commands.owner'); if ($owner && $data['from']['nick'] !== $owner) { return; } switch (trim($data['message'])) { case 'quit': die; break; } }
public static function receiveException(Core\Event\Bucket $bucket) { // Early draft. self::$_message = $bucket->getData()->raise(); return; }
public function onQuit(Bucket $bucket) { $data = $bucket->getData(); $this->log(sprintf('%s quit IRC (%s)', $data['from']['nick'], $data['message'])); }