aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorGravatar wodim2017-08-26 21:52:52 +0200
committerGravatar wodim2017-08-26 21:52:52 +0200
commit9433e78da8c47b791f39e5d5e1182a84f7c7eebf (patch)
tree5ea3cc71a1dc055255f7989e7318b3e3b0050630 /src/modules
parentremove blank part of the splash img (diff)
downloadKVIrc-9433e78da8c47b791f39e5d5e1182a84f7c7eebf.tar.gz
KVIrc-9433e78da8c47b791f39e5d5e1182a84f7c7eebf.tar.bz2
KVIrc-9433e78da8c47b791f39e5d5e1182a84f7c7eebf.zip
Fix the second parameter of $context.getSSLCertInfo not being optional
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/context/libkvicontext.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/modules/context/libkvicontext.cpp b/src/modules/context/libkvicontext.cpp
index 163e4e86b..ef575d681 100644
--- a/src/modules/context/libkvicontext.cpp
+++ b/src/modules/context/libkvicontext.cpp
@@ -655,7 +655,7 @@ static bool context_kvs_fnc_getSSLCertInfo(KviKvsModuleFunctionCall * c)
QString szQuery;
QString szType;
QString szParam1;
- bool bRemote = true;
+ bool bRemote;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("query", KVS_PT_STRING, 0, szQuery)
@@ -689,16 +689,17 @@ static bool context_kvs_fnc_getSSLCertInfo(KviKvsModuleFunctionCall * c)
{
bRemote = false;
}
+ else if(szType.compare("remote") == 0 || szType.isEmpty())
+ {
+ bRemote = true;
+ }
else
{
- // already defaults to true, we only catch the error condition
- if(szType.compare("remote") != 0)
- {
- c->warning(__tr2qs("You specified a bad string for the parameter \"type\""));
- c->returnValue()->setString("");
- return true;
- }
+ c->warning(__tr2qs("You specified a bad string for the parameter \"type\""));
+ c->returnValue()->setString("");
+ return true;
}
+
//context is never null, connection can be null
if(!pConsole->context()->connection())
{