Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ugly hack to fix suggestversion when set anywhere but the .ini
diff --git a/src/murmur/Server.cpp b/src/murmur/Server.cpp
index e50fbb2..410a9fc 100644
--- a/src/murmur/Server.cpp
+++ b/src/murmur/Server.cpp
@@ -43,6 +43,7 @@
#include "PacketDataStream.h"
#include "ServerDB.h"
#include "ServerUser.h"
+#include "Version.h"
#ifdef USE_BONJOUR
#include "BonjourServer.h"
@@ -386,7 +387,7 @@ void Server::readParams() {
bAllowPing = getConf("allowping", bAllowPing).toBool();
bCertRequired = getConf("certrequired", bCertRequired).toBool();
- qvSuggestVersion = getConf("suggestversion", qvSuggestVersion);
+ qvSuggestVersion = MumbleVersion::getRaw(getConf("suggestversion", qvSuggestVersion).toString());
if (qvSuggestVersion.toUInt() == 0)
qvSuggestVersion = QVariant();
@@ -507,7 +508,7 @@ void Server::setLiveConf(const QString &key, const QString &value) {
else if (key == "channelname")
qrChannelName=!v.isNull() ? QRegExp(v) : Meta::mp.qrChannelName;
else if (key == "suggestversion")
- qvSuggestVersion = ! v.isNull() ? (v.isEmpty() ? QVariant() : v) : Meta::mp.qvSuggestVersion;
+ qvSuggestVersion = ! v.isNull() ? (v.isEmpty() ? QVariant() : MumbleVersion::getRaw(v)) : Meta::mp.qvSuggestVersion;
else if (key == "suggestpositional")
qvSuggestPositional = ! v.isNull() ? (v.isEmpty() ? QVariant() : v) : Meta::mp.qvSuggestPositional;
else if (key == "suggestpushtotalk")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.