From 02c89fceeb915e31b36dd4acb4218ccd913b2ce8 Mon Sep 17 00:00:00 2001 From: jacopo grandi Date: Mon, 22 Feb 2021 14:52:31 +0100 Subject: rename ingame template and army --- gst/info.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gst/info.c') diff --git a/gst/info.c b/gst/info.c index 15c7c0b..2328df3 100644 --- a/gst/info.c +++ b/gst/info.c @@ -941,3 +941,14 @@ int info_army_get_list (char l[][32]) { } return len; } + +void info_army_rename (char oldn[], char newn[]) { + char pathnameold[64]; sprintf(pathnameold, "army/%s.txt", oldn); + char pathnamenew[64]; sprintf(pathnamenew, "army/%s.txt", newn); + rename(pathnameold, pathnamenew); +} + +void info_army_remove (char name[]) { + char pathname[64]; sprintf(pathname, "army/%s.txt", name); + remove(pathname); +} -- cgit v1.2.3-54-g00ecf