From d67728a19238c373dff3c6217bec1709bb4846b7 Mon Sep 17 00:00:00 2001
From: Joe <rbo@gmx.us>
Date: Thu, 11 Apr 2024 20:20:20 +0200
Subject: cool

---
 src/c_defs.go   |  3 ++-
 src/i_insert.go | 15 +++++++++++++++
 2 files changed, 17 insertions(+), 1 deletion(-)

(limited to 'src')

diff --git a/src/c_defs.go b/src/c_defs.go
index d8933e6..d899720 100644
--- a/src/c_defs.go
+++ b/src/c_defs.go
@@ -43,7 +43,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  *
  * hardflip: src/c_defs.go
- * Wed Feb 21 19:40:07 2024
+ * Thu Apr 11 17:55:54 2024
  * Joe
  *
  * constants
@@ -127,6 +127,7 @@ const (
 	INS_RDP_USER
 	INS_RDP_PASS
 	INS_RDP_FILE
+	INS_RDP_QUALITY
 	// TODO: here
 	INS_RDP_OK
 )
diff --git a/src/i_insert.go b/src/i_insert.go
index d2c7c20..dac18a6 100644
--- a/src/i_insert.go
+++ b/src/i_insert.go
@@ -107,8 +107,23 @@ func i_insert_abs_files(insert *HostNode) {
 	}
 }
 
+func i_insert_default_users(insert *HostNode) {
+	switch insert.Protocol {
+	case PROTOCOL_SSH:
+		if len(insert.User) == 0 {
+			insert.User = "root"
+		}
+	case PROTOCOL_RDP:
+		if len(insert.User) == 0 {
+			insert.User = "Administrator"
+		}
+	default: return
+	}
+}
+
 func i_insert_host(data *HardData, insert *HostNode) {
 	i_insert_abs_files(insert)
+	i_insert_default_users(insert)
 	filename := i_insert_format_filename(insert.Name,
 		data.data_dir + insert.parent.path())
 	insert.filename = filename
-- 
cgit v1.2.3