public function execute()
    {
        $msg = $this->phpci->interpolate($this->message);

        if (empty($this->server) || empty($this->room) || empty($this->nick)) {
            $this->phpci->logFailure(Lang::get('irc_settings'));
        }

        if (empty($this->port)) {
            $this->port = 6667;
        }

        $sock = fsockopen($this->server, $this->port);
        stream_set_timeout($sock, 1);

        $connectCommands = array(
            'USER ' . $this->nick . ' 0 * :' . $this->nick,
            'NICK ' . $this->nick,
        );
        $this->executeIrcCommands($sock, $connectCommands);
        $this->executeIrcCommand($sock, 'JOIN ' . $this->room);
        $this->executeIrcCommand($sock, 'PRIVMSG ' . $this->room . ' :' . $msg);

        fclose($sock);

        return true;
    }
public function execute()
    {
        $msg = $this->phpci->interpolate($this->message);

        if (empty($this->server) || empty($this->room) || empty($this->nick)) {
            $this->phpci->logFailure(Lang::get('irc_settings'));
        }

        if (empty($this->port)) {
            $this->port = 6667;
        }

        $sock = fsockopen($this->server, $this->port);
        stream_set_timeout($sock, 1);

        $connectCommands = array(
            'USER ' . $this->nick . ' 0 * :' . $this->nick,
            'NICK ' . $this->nick,
        );
        $this->executeIrcCommands($sock, $connectCommands);
        $this->executeIrcCommand($sock, 'JOIN ' . $this->room);
        $this->executeIrcCommand($sock, 'PRIVMSG ' . $this->room . ' :' . $msg);

        fclose($sock);

        return true;
    }
public function execute ( ) { $ msg = $ this -> phpci -> interpolate ( $ this -> message ) ; if ( empty ( $ this -> server ) || empty ( $ this -> room ) || empty ( $ this -> nick ) ) { $ this -> phpci -> logFailure ( Lang :: get ( 'irc_settings' ) ) ; } if ( empty ( $ this -> port ) ) { $ this -> port = 6667 ; } $ sock = fsockopen ( $ this -> server , $ this -> port ) ; stream_set_timeout ( $ sock , 1 ) ; $ connectCommands = array ( 'USER ' . $ this -> nick . ' 0 * :' . $ this -> nick , 'NICK ' . $ this -> nick , ) ; $ this -> executeIrcCommands ( $ sock , $ connectCommands ) ; $ this -> executeIrcCommand ( $ sock , 'JOIN ' . $ this -> room ) ; $ this -> executeIrcCommand ( $ sock , 'PRIVMSG ' . $ this -> room . ' :' . $ msg ) ; fclose ( $ sock ) ; return true ; }
Run IRC plugin.
@return bool
Run IRC plugin .