From 4a59a83ecaa55fee07c2744ad30d4f12cf1cdd27 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Wed, 12 Jun 2024 21:06:24 +0200 Subject: [PATCH] init name from config if empty --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index bb9e1df..1d17f9c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -213,7 +213,7 @@ int main(int argc, char** argv) { { // name stuff auto name = tc.toxSelfGetName(); if (name.empty()) { - name = "totato"; + name = conf.get_string("tox", "name").value_or("totato"); } conf.set("tox", "name", name); tc.setSelfName(name); // TODO: this is ugly