Skip to content

Instantly share code, notes, and snippets.

@fwaggle
Created May 29, 2013 02:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fwaggle/584cf2a96002af9d0f64 to your computer and use it in GitHub Desktop.
Save fwaggle/584cf2a96002af9d0f64 to your computer and use it in GitHub Desktop.
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