Added the ability for SSL to be fined in the irc_config.json file, if not there we assume that its false and continue on our way. if "ssl":true is in the config then we are going to use ssl:// to make the connection use openssl.
This commit is contained in:
@@ -94,7 +94,11 @@ final class PhabricatorIRCBot extends PhabricatorDaemon {
|
|||||||
|
|
||||||
$errno = null;
|
$errno = null;
|
||||||
$error = null;
|
$error = null;
|
||||||
|
if (!$ssl) {
|
||||||
$socket = fsockopen($server, $port, $errno, $error);
|
$socket = fsockopen($server, $port, $errno, $error);
|
||||||
|
} else {
|
||||||
|
$socket = fsockopen('ssl://'.$server, $port, $errno, $error);
|
||||||
|
}
|
||||||
if (!$socket) {
|
if (!$socket) {
|
||||||
throw new Exception("Failed to connect, #{$errno}: {$error}");
|
throw new Exception("Failed to connect, #{$errno}: {$error}");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user