/** * @param Irc $parent * @param $params */ public function __construct($parent, $params) { $this->id = uniqid(); $this->parent = $parent; $parent->attach('sms_' . $this->id, array($this, 'privmsg'), array("PRIVMSG"), '/^!sms/i'); $this->service = SmsService::getInstance(); $this->service->addNetwork($parent->getNetworkName(), $this); }