Make IRC plugin join channel before attempting to send a message.

Closes #579
This commit is contained in:
Stefan 2014-09-03 18:09:54 +02:00 committed by Dan Cryer
parent 61d864e4f0
commit eb508baa4f

View file

@ -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)) {