PHPDaemon\Servers\IRCBouncer\Connection::attachTo PHP Method

attachTo() public method

public attachTo ( )
    public function attachTo()
    {
        if ($this->pool->conn) {
            $this->attachedServer = $this->pool->conn;
            $this->attachedServer->attachedClients->attach($this);
        } else {
            return;
        }
        $this->msgFromBNC('Attached to ' . $this->attachedServer->url);
        $this->usermask = $this->attachedServer->nick . '!' . $this->attachedServer->user . '@' . $this->pool->config->servername->value;
        $this->command(null, 'RPL_WELCOME', $this->attachedServer->nick, 'Welcome to phpDaemon bouncer -- ' . $this->pool->config->servername->value);
        foreach ($this->attachedServer->channels as $chan) {
            $this->exportChannel($chan);
        }
    }