From eb508baa4f0f7f6a5f7690def6468fcf466c5e56 Mon Sep 17 00:00:00 2001 From: Stefan Date: Wed, 3 Sep 2014 18:09:54 +0200 Subject: [PATCH] Make IRC plugin join channel before attempting to send a message. Closes #579 --- PHPCI/Plugin/Irc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/PHPCI/Plugin/Irc.php b/PHPCI/Plugin/Irc.php index fd774b8c..cdc72491 100644 --- a/PHPCI/Plugin/Irc.php +++ b/PHPCI/Plugin/Irc.php @@ -62,6 +62,7 @@ class Irc implements \PHPCI\Plugin $sock = fsockopen($this->server, $this->port); fputs($sock, 'USER ' . $this->nick . ' phptesting.org ' . $this->nick . ' :' . $this->nick . "\r\n"); fputs($sock, 'NICK ' . $this->nick . "\r\n"); + fputs($sock, 'JOIN ' . $this->room . "\r\n"); fputs($sock, 'PRIVMSG ' . $this->room . ' :' . $msg . "\r\n"); while (fgets($sock)) {