summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/channels.cpp8
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp4
2 files changed, 10 insertions, 2 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index 6c9bd7c85..9f1eafd0c 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -202,10 +202,18 @@ void Channel::SetDefaultModes()
if (mode)
{
if (mode->GetNumParams(true))
+ {
list.GetToken(parameter);
+ // If the parameter begins with a ':' then it's invalid
+ if (parameter.c_str()[0] == ':')
+ continue;
+ }
else
parameter.clear();
+ if ((mode->GetNumParams(true)) && (parameter.empty()))
+ continue;
+
mode->OnModeChange(ServerInstance->FakeClient, ServerInstance->FakeClient, this, parameter, true);
}
}
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 6a6a7923a..7934c23ab 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -281,8 +281,6 @@ class ModuleSSLGnuTLS : public Module
ServerInstance->GenRandom = &randhandler;
- // Void return, guess we assume success
- gnutls_certificate_set_dh_params(x509_cred, dh_params);
Implementation eventlist[] = { I_On005Numeric, I_OnRehash, I_OnModuleRehash, I_OnUserConnect,
I_OnEvent, I_OnHookIO };
ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
@@ -487,6 +485,8 @@ class ModuleSSLGnuTLS : public Module
{
GenerateDHParams();
}
+
+ gnutls_certificate_set_dh_params(x509_cred, dh_params);
}
void GenerateDHParams()