From 662f12aa4b739363a08704a21e8390b95ccc133c Mon Sep 17 00:00:00 2001 From: pztrn Date: Sun, 9 Oct 2016 01:31:53 +0500 Subject: [PATCH] Fixed launching URTrator if server name have no markup. --- ui/mainwindow_launch.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ui/mainwindow_launch.go b/ui/mainwindow_launch.go index 7ed3d1b..583a80a 100644 --- a/ui/mainwindow_launch.go +++ b/ui/mainwindow_launch.go @@ -179,9 +179,11 @@ func (m *MainWindow) launchActually(server_profile *datamodels.Server, user_prof } // Hey, we're ok here! :) Launch Urban Terror! - // Crear server name from "" things. - srv_name_for_label := string([]byte(server_profile.Name)[8:len(server_profile.Name)-9]) - fmt.Println(srv_name_for_label) + // Clear server name from "" things. + srv_name_for_label := server_profile.Name + if strings.Contains(server_profile.Name, "markup") { + srv_name_for_label = string([]byte(server_profile.Name)[8:len(server_profile.Name)-9]) + } // Show great coloured label. ctx.Eventer.LaunchEvent("setToolbarLabelText", map[string]string{"text": "Urban Terror is launched with profile " + user_profile.Name + " and connected to " + srv_name_for_label + ""}) m.launch_button.SetSensitive(false)