mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 10:39:02 -04:00
Merge branch 'insp3' into master.
This commit is contained in:
commit
e2243c3aae
@ -285,7 +285,7 @@ public:
|
||||
/** Escapes a value for use in a tag value.
|
||||
* @param value The value to escape.
|
||||
*/
|
||||
static std::string CoreExport EscapeTag(const std::string& value);
|
||||
static std::string EscapeTag(const std::string& value);
|
||||
|
||||
private:
|
||||
typedef std::vector<std::pair<SerializedInfo, SerializedMessage>> SerializedList;
|
||||
|
@ -68,7 +68,7 @@ const ClientProtocol::SerializedMessage& ClientProtocol::Serializer::SerializeFo
|
||||
return msg.GetSerialized(Message::SerializedInfo(this, MakeTagWhitelist(user, msg.GetTags())));
|
||||
}
|
||||
|
||||
std::string CoreExport ClientProtocol::Message::EscapeTag(const std::string& value)
|
||||
std::string ClientProtocol::Message::EscapeTag(const std::string& value)
|
||||
{
|
||||
std::string ret;
|
||||
ret.reserve(value.size());
|
||||
@ -99,7 +99,6 @@ std::string CoreExport ClientProtocol::Message::EscapeTag(const std::string& val
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
const ClientProtocol::SerializedMessage& ClientProtocol::Message::GetSerialized(const SerializedInfo& serializeinfo) const
|
||||
{
|
||||
// First check if the serialized line they're asking for is in the cache
|
||||
|
@ -119,9 +119,7 @@ namespace GnuTLS
|
||||
// Nothing to deallocate, constructor may throw freely
|
||||
Hash(const std::string& hashname)
|
||||
{
|
||||
// As gnutls_digest_algorithm_t and gnutls_mac_algorithm_t are mapped 1:1, we can do this
|
||||
// There is no gnutls_dig_get_id() at the moment, but it may come later
|
||||
hash = (gnutls_digest_algorithm_t)gnutls_mac_get_id(hashname.c_str());
|
||||
hash = gnutls_digest_get_id(hashname.c_str());
|
||||
if (hash == GNUTLS_DIG_UNKNOWN)
|
||||
throw Exception("Unknown hash type " + hashname);
|
||||
|
||||
@ -978,7 +976,7 @@ public:
|
||||
|
||||
bool GetServerName(std::string& out) const override
|
||||
{
|
||||
std::vector<char> nameBuffer;
|
||||
std::vector<char> nameBuffer(1);
|
||||
size_t nameLength = 0;
|
||||
unsigned int nameType = GNUTLS_NAME_DNS;
|
||||
|
||||
|
@ -42,6 +42,10 @@ if (scalar @ARGV < 2) {
|
||||
# needs so we disable it.
|
||||
STDOUT->autoflush(1);
|
||||
|
||||
# If a server closes the connection whilst an SSL session is being initiated we
|
||||
# want EPIPE instead of SIGPIPE.
|
||||
$SIG{PIPE} = 'IGNORE';
|
||||
|
||||
my $hostip = shift @ARGV;
|
||||
if ($hostip =~ /[^A-Za-z0-9.:-]/) {
|
||||
say STDERR "Error: invalid hostname or IP address: $hostip";
|
||||
@ -73,7 +77,11 @@ It seems like the server endpoint you specified is not reachable! Make sure that
|
||||
* If you are using a firewall incoming connections on TCP port $port are allowed.
|
||||
* The endpoint your server is listening on is not local or private.
|
||||
|
||||
See https://docs.inspircd.org/4/configuration/#ltbindgt for more information.
|
||||
The error provided by the socket library was:
|
||||
|
||||
$IO::Socket::errstr
|
||||
|
||||
See https://docs.inspircd.org/4/configuration/#bind for more information.
|
||||
EOM
|
||||
exit 1;
|
||||
}
|
||||
@ -82,7 +90,7 @@ say "${\CC_GREEN}yes${\CC_RESET}";
|
||||
print "Checking whether ${\CC_BOLD}$hostip/$port${\CC_RESET} is using plaintext ... ";
|
||||
my $error = $sock->recv(my $data, 1);
|
||||
|
||||
if ($error) {
|
||||
if (!defined $error || $data eq '') {
|
||||
say <<"EOM";
|
||||
${\CC_RED}error${\CC_RESET}
|
||||
|
||||
@ -90,8 +98,9 @@ It seems like the server dropped the connection before sending anything! Make su
|
||||
|
||||
* The endpoint you specified is actually your IRC server.
|
||||
* If you are using a firewall incoming data on TCP port $port are allowed.
|
||||
* The IP address you are connecting from has not been banned from the server.
|
||||
|
||||
See https://docs.inspircd.org/4/configuration/#ltbindgt for more information.
|
||||
See https://docs.inspircd.org/4/configuration/#bind for more information.
|
||||
EOM
|
||||
exit 1;
|
||||
} elsif ($data =~ /[A-Z:@]/) {
|
||||
@ -151,7 +160,6 @@ EOM
|
||||
exit 1;
|
||||
}
|
||||
|
||||
|
||||
say <<"EOM";
|
||||
${\CC_GREEN}yes${\CC_RESET}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user