Make IRC plugin join channel before attempting to send a message.
Closes #579
This commit is contained in:
parent
61d864e4f0
commit
eb508baa4f
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue