From 1baecfdbecac6199eb95e01d2f151f41ed01bd3b Mon Sep 17 00:00:00 2001 From: Mikkel Krautz Date: Sat, 12 Nov 2011 22:18:55 +0100 Subject: [PATCH] Fix OS information in server info dialog fixme. --- client.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/client.go b/client.go index f632460..56b5516 100644 --- a/client.go +++ b/client.go @@ -16,6 +16,7 @@ import ( "log" "net" "packetdatastream" + "runtime" "time" ) @@ -446,12 +447,15 @@ func (client *Client) receiver() { // information we must send it our version information so it knows // what version of the protocol it should speak. if client.state == StateClientConnected { - client.sendMessage(&mumbleproto.Version{ + version := &mumbleproto.Version{ Version: proto.Uint32(0x10203), Release: proto.String("Grumble"), - }) - // fixme(mkrautz): Re-add OS information... Does it break anything? It seems like - // the client discards the version message if there is no OS information in it. + } + if client.server.cfg.BoolValue("SendOSInfo") { + version.Os = proto.String(runtime.GOOS) + version.OsVersion = proto.String("(Unknown version)") + } + client.sendMessage(version) client.state = StateServerSentVersion continue } else if client.state == StateServerSentVersion {