for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Jerodev\PhpIrcClient\Messages;
use Jerodev\PhpIrcClient\Helpers\Event;
class PrivmsgMessage extends IrcMessage
{
/** @var string */
public $user;
public $target;
public $message;
public function __construct(string $message)
parent::__construct($message);
$this->user = preg_replace('/^([^!]+)!.*?$/', '$1', $this->source);
$this->target = $this->commandsuffix;
$this->message = $this->payload;
}
public function getEvents(): array
return [
new Event('message', [$this->user, $this->target, $this->message])
];